• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ControlFlags类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ControlFlags的典型用法代码示例。如果您正苦于以下问题:C# ControlFlags类的具体用法?C# ControlFlags怎么用?C# ControlFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ControlFlags类属于命名空间,在下文中一共展示了ControlFlags类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RawSecurityDescriptor

		public RawSecurityDescriptor (byte[] binaryForm, int offset)
		{
			if (binaryForm == null)
				throw new ArgumentNullException("binaryForm");
			
			if (offset < 0 || offset > binaryForm.Length - 0x14)
				throw new ArgumentOutOfRangeException("offset", offset, "Offset out of range");
			
			if (binaryForm[offset] != 1)
				throw new ArgumentException("Unrecognized Security Descriptor revision.", "binaryForm");
			
			resourcemgr_control = binaryForm[offset + 0x01];
			control_flags = (ControlFlags)ReadUShort(binaryForm, offset + 0x02);
			
			int ownerPos = ReadInt(binaryForm, offset + 0x04);
			int groupPos = ReadInt(binaryForm, offset + 0x08);
			int saclPos = ReadInt(binaryForm, offset + 0x0C);
			int daclPos = ReadInt(binaryForm, offset + 0x10);
			
			if (ownerPos != 0)
				owner_sid = new SecurityIdentifier(binaryForm, ownerPos);
			
			if (groupPos != 0)
				group_sid = new SecurityIdentifier(binaryForm, groupPos);
			
			if (saclPos != 0)
				system_acl = new RawAcl(binaryForm, saclPos);
			
			if (daclPos != 0)
				discretionary_acl = new RawAcl(binaryForm, daclPos);
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:31,代码来源:RawSecurityDescriptor.cs


示例2: RawSecurityDescriptor

		public RawSecurityDescriptor (ControlFlags flags,
					      SecurityIdentifier owner,
					      SecurityIdentifier group,
					      RawAcl systemAcl,
					      RawAcl discretionaryAcl)
		{
		}
开发者ID:runefs,项目名称:Marvin,代码行数:7,代码来源:RawSecurityDescriptor.cs


示例3: CommonSecurityDescriptor

		public CommonSecurityDescriptor (bool isContainer, bool isDS,
						 ControlFlags flags,
						 SecurityIdentifier owner,
						 SecurityIdentifier group,
						 SystemAcl systemAcl,
						 DiscretionaryAcl discretionaryAcl)
		{
			Init (isContainer, isDS, flags, owner, group, systemAcl, discretionaryAcl);
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:9,代码来源:CommonSecurityDescriptor.cs


示例4: CommonSecurityDescriptor

		public CommonSecurityDescriptor (bool isContainer, bool isDS,
						 ControlFlags flags,
						 SecurityIdentifier owner,
						 SecurityIdentifier group,
						 SystemAcl systemAcl,
						 DiscretionaryAcl discretionaryAcl)
		{
			this.isContainer = isContainer;
			this.isDS = isDS;
			this.flags = flags;
			this.owner = owner;
			this.group = group;
			this.systemAcl = systemAcl;
			this.discretionaryAcl = discretionaryAcl;
			
			throw new NotImplementedException ();
		}
开发者ID:runefs,项目名称:Marvin,代码行数:17,代码来源:CommonSecurityDescriptor.cs


示例5: AddControlFlags

        //
        // These two add/remove method must be called with great care (and thus it is internal)
        // The caller is responsible for keeping the SaclPresent and DaclPresent bits in sync
        // with the actual SACL and DACL.
        //

        internal void AddControlFlags(ControlFlags flags)
        {
            _rawSd.SetFlags(_rawSd.ControlFlags | flags);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:10,代码来源:SecurityDescriptor.cs


示例6: UpdateControlFlags

 internal void UpdateControlFlags(ControlFlags flagsToUpdate, ControlFlags newFlags)
 {
     ControlFlags finalFlags = newFlags | (_rawSd.ControlFlags & (~flagsToUpdate));
     _rawSd.SetFlags(finalFlags);
 }
开发者ID:Corillian,项目名称:corefx,代码行数:5,代码来源:SecurityDescriptor.cs


示例7: UserHintJumpBlock

 public UserHintJumpBlock(BinaryReader binaryReader)
 {
     this.flags = (Flags)binaryReader.ReadInt16();
     this.geometryIndex = binaryReader.ReadShortBlockIndex1();
     this.forceJumpHeight = (ForceJumpHeight)binaryReader.ReadInt16();
     this.controlFlags = (ControlFlags)binaryReader.ReadInt16();
 }
开发者ID:jacksoncougar,项目名称:Moonfish-Editor,代码行数:7,代码来源:Scenario.cs


示例8: GetSddlForm

		internal override string GetSddlForm(ControlFlags sdFlags,
		                                     bool isDacl)
		{
			StringBuilder result = new StringBuilder();
			
			if(isDacl) {
				if((sdFlags & ControlFlags.DiscretionaryAclProtected) != 0)
					result.Append("P");
				if((sdFlags & ControlFlags.DiscretionaryAclAutoInheritRequired) != 0)
					result.Append("AR");
				if((sdFlags & ControlFlags.DiscretionaryAclAutoInherited) != 0)
					result.Append("AI");
			} else {
				if((sdFlags & ControlFlags.SystemAclProtected) != 0)
					result.Append("P");
				if((sdFlags & ControlFlags.SystemAclAutoInheritRequired) != 0)
					result.Append("AR");
				if((sdFlags & ControlFlags.SystemAclAutoInherited) != 0)
					result.Append("AI");
			}
			
			foreach(var ace in list)
			{
				result.Append(ace.GetSddlForm());
			}
			
			return result.ToString();
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:28,代码来源:RawAcl.cs


示例9: GetControlFlag

 private bool GetControlFlag(ControlFlags flag)
 {
     return (agentControls & (uint)flag) != 0;
 }
开发者ID:RavenB,项目名称:gridsearch,代码行数:4,代码来源:AgentManagerMovement.cs


示例10: CreateFromParts

        private void CreateFromParts(bool isContainer, bool isDS, ControlFlags flags, SecurityIdentifier owner, SecurityIdentifier group, SystemAcl systemAcl, DiscretionaryAcl discretionaryAcl)
        {
            if (systemAcl != null &&
                systemAcl.IsContainer != isContainer)
            {
                throw new ArgumentException(
                     isContainer ?
                        SR.AccessControl_MustSpecifyContainerAcl :
                        SR.AccessControl_MustSpecifyLeafObjectAcl,
nameof(systemAcl));
            }

            if (discretionaryAcl != null &&
                discretionaryAcl.IsContainer != isContainer)
            {
                throw new ArgumentException(
                     isContainer ?
                        SR.AccessControl_MustSpecifyContainerAcl :
                        SR.AccessControl_MustSpecifyLeafObjectAcl,
nameof(discretionaryAcl));
            }

            _isContainer = isContainer;

            if (systemAcl != null &&
                systemAcl.IsDS != isDS)
            {
                throw new ArgumentException(
                     isDS ?
                        SR.AccessControl_MustSpecifyDirectoryObjectAcl :
                        SR.AccessControl_MustSpecifyNonDirectoryObjectAcl,
nameof(systemAcl));
            }

            if (discretionaryAcl != null &&
                discretionaryAcl.IsDS != isDS)
            {
                throw new ArgumentException(
                    isDS ?
                        SR.AccessControl_MustSpecifyDirectoryObjectAcl :
                        SR.AccessControl_MustSpecifyNonDirectoryObjectAcl,
nameof(discretionaryAcl));
            }

            _isDS = isDS;

            _sacl = systemAcl;

            //
            // Replace null DACL with an allow-all for everyone DACL
            //

            if (discretionaryAcl == null)
            {
                //
                // to conform to native behavior, we will add allow everyone ace for DACL
                //

                discretionaryAcl = DiscretionaryAcl.CreateAllowEveryoneFullAccess(_isDS, _isContainer);
            }

            _dacl = discretionaryAcl;

            //
            // DACL is never null. So always set the flag bit on
            //

            ControlFlags actualFlags = flags | ControlFlags.DiscretionaryAclPresent;

            //
            // Keep SACL and the flag bit in sync.
            //

            if (systemAcl == null)
            {
                unchecked { actualFlags &= ~(ControlFlags.SystemAclPresent); }
            }
            else
            {
                actualFlags |= (ControlFlags.SystemAclPresent);
            }

            _rawSd = new RawSecurityDescriptor(actualFlags, owner, group, systemAcl == null ? null : systemAcl.RawAcl, discretionaryAcl.RawAcl);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:84,代码来源:SecurityDescriptor.cs


示例11: RawSecurityDescriptor

        //
        // Creates a security descriptor explicitly
        //

        public RawSecurityDescriptor(ControlFlags flags, SecurityIdentifier owner, SecurityIdentifier group, RawAcl systemAcl, RawAcl discretionaryAcl)
            : base()
        {
            CreateFromParts(flags, owner, group, systemAcl, discretionaryAcl);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:9,代码来源:SecurityDescriptor.cs


示例12: SetDiscretionaryAclProtection

		public void SetDiscretionaryAclProtection (bool isProtected,
							   bool preserveInheritance)
		{
			DiscretionaryAcl.IsAefa = false;
			
			if (!isProtected) {
				flags &= ~ControlFlags.DiscretionaryAclProtected;
				return;
			}
			
			flags |= ControlFlags.DiscretionaryAclProtected;
			if (!preserveInheritance)
				DiscretionaryAcl.RemoveInheritedAces ();
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:14,代码来源:CommonSecurityDescriptor.cs


示例13: SetControlFlag

	// Set a control flag.
	private void SetControlFlag(ControlFlags mask, bool value)
			{
				if(value)
				{
					flags |= mask;
				}
				else
				{
					flags &= ~mask;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:12,代码来源:Control.cs


示例14: SetFlags

		public void SetFlags (ControlFlags flags)
		{
			control_flags = flags | ControlFlags.SelfRelative;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:4,代码来源:RawSecurityDescriptor.cs


示例15: RemoveControlFlags

 internal void RemoveControlFlags(ControlFlags flags)
 {
     unchecked
     {
         _rawSd.SetFlags(_rawSd.ControlFlags & ~flags);
     }
 }
开发者ID:Corillian,项目名称:corefx,代码行数:7,代码来源:SecurityDescriptor.cs


示例16: SetSystemAclProtection

		public void SetSystemAclProtection (bool isProtected,
						    bool preserveInheritance)
		{
			if (!isProtected) {
				flags &= ~ControlFlags.SystemAclProtected;
				return;
			}
			
			flags |= ControlFlags.SystemAclProtected;
			if (!preserveInheritance && SystemAcl != null)
				SystemAcl.RemoveInheritedAces ();
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:12,代码来源:CommonSecurityDescriptor.cs


示例17: AddDiscretionaryAcl

		public void AddDiscretionaryAcl (byte revision, int trusted)
		{
			DiscretionaryAcl = new DiscretionaryAcl (IsContainer, IsDS, revision, trusted);
			flags |= ControlFlags.DiscretionaryAclPresent;
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:5,代码来源:CommonSecurityDescriptor.cs


示例18: SetFlags

        public void SetFlags(ControlFlags flags)
        {
            //
            // We can not deal with non-self-relative descriptors
            // so just forget about it
            //

            _flags = (flags | ControlFlags.SelfRelative);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:9,代码来源:SecurityDescriptor.cs


示例19: AddSystemAcl

		public void AddSystemAcl(byte revision, int trusted)
		{
			SystemAcl = new SystemAcl (IsContainer, IsDS, revision, trusted);
			flags |= ControlFlags.SystemAclPresent;
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:5,代码来源:CommonSecurityDescriptor.cs


示例20: CommonSecurityDescriptor

 private CommonSecurityDescriptor(bool isContainer, bool isDS, ControlFlags flags, SecurityIdentifier owner, SecurityIdentifier group, RawAcl systemAcl, RawAcl discretionaryAcl)
     : this(isContainer, isDS, flags, owner, group, systemAcl == null ? null : new SystemAcl(isContainer, isDS, systemAcl), discretionaryAcl == null ? null : new DiscretionaryAcl(isContainer, isDS, discretionaryAcl))
 {
 }
开发者ID:Corillian,项目名称:corefx,代码行数:4,代码来源:SecurityDescriptor.cs



注:本文中的ControlFlags类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ControlInfo类代码示例发布时间:2022-05-24
下一篇:
C# ControlCopyFlags类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap