当前位置: 首页>>代码示例>>C#>>正文


C# AceFlags类代码示例

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


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

示例1: CommonAce

	// Constructor.
	public CommonAce(AceFlags flags, AceQualifier qualifier, int accessMask,
					 SecurityIdentifier sid, bool isCallback, byte[] opaque)
			: base(flags, (AceType)qualifier, accessMask,
			       sid, opaque, qualifier, isCallback)
			{
				// Nothing to do here.
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:CommonAce.cs

示例2: KnownAce

        public KnownAce(AceType type, AceFlags flags, int mask, Sid sid)
        {
            if (
                type != AceType.AccessAllowed &&
                type != AceType.AccessDenied &&
                type != AceType.SystemAlarm &&
                type != AceType.SystemAudit
                )
                throw new ArgumentException("Invalid ACE type.");

            this.MemoryRegion = new MemoryAlloc(
                Marshal.SizeOf(typeof(KnownAceStruct)) -
                sizeof(int) +
                sid.Length
                );

            KnownAceStruct knownAce = new KnownAceStruct();

            knownAce.Header.AceType = type;
            knownAce.Header.AceFlags = flags;
            knownAce.Header.AceSize = (ushort)this.MemoryRegion.Size;
            knownAce.Mask = mask;

            this.MemoryRegion.WriteStruct<KnownAceStruct>(knownAce);

            this.MemoryRegion.WriteMemory(Win32.KnownAceSidStartOffset.ToInt32(), sid, 0, sid.Length);

            this.Read();
        }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:29,代码来源:KnownAce.cs

示例3: KnownAce

        public KnownAce(AceType type, AceFlags flags, int mask, Sid sid)
        {
            if (
                type != AceType.AccessAllowed &&
                type != AceType.AccessDenied &&
                type != AceType.SystemAlarm &&
                type != AceType.SystemAudit
                )
                throw new ArgumentException("Invalid ACE type.");

            this.MemoryRegion = new MemoryAlloc(
                Marshal.SizeOf(typeof(KnownAceStruct)) - // known ace struct size
                sizeof(int) + // minus SidStart field
                sid.Length // plus SID length
                );

            KnownAceStruct knownAce = new KnownAceStruct();

            // Initialize the ACE (minus the SID).
            knownAce.Header.AceType = type;
            knownAce.Header.AceFlags = flags;
            knownAce.Header.AceSize = (ushort)this.MemoryRegion.Size;
            knownAce.Mask = mask;
            // Write the ACE to memory.
            this.MemoryRegion.WriteStruct<KnownAceStruct>(knownAce);
            // Write the SID.
            this.MemoryRegion.WriteMemory(Win32.KnownAceSidStartOffset.ToInt32(), sid, 0, sid.Length);
            // Update the cached info.
            this.Read();
        }
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:30,代码来源:KnownAce.cs

示例4: KnownAce

	// Constructor.
	internal KnownAce(AceFlags aceFlags, AceType aceType,
					  int accessMask, SecurityIdentifier securityIdentifier)
			: base(aceFlags, aceType)
			{
				this.accessMask = accessMask;
				this.securityIdentifier = securityIdentifier;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:KnownAce.cs

示例5: CommonAce

		internal CommonAce (AceType type, AceFlags flags, int accessMask,
		                    SecurityIdentifier sid, byte[] opaque)
			: base(type, flags, opaque)
		{
			AccessMask = accessMask;
			SecurityIdentifier = sid;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:CommonAce.cs

示例6: CompoundAce

		public CompoundAce (AceFlags flags, int accessMask, CompoundAceType compoundAceType, SecurityIdentifier sid)
			: base (AceType.AccessAllowedCompound, flags)
		{
			this.compound_ace_type = compoundAceType;
			this.AccessMask = accessMask;
			this.SecurityIdentifier = sid;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:CompoundAce.cs

示例7: CustomAce

 public CustomAce(AceType type, AceFlags flags, byte[] opaque) : base(type, flags)
 {
     if (type <= AceType.SystemAlarmCallbackObject)
     {
         throw new ArgumentOutOfRangeException("type", Environment.GetResourceString("ArgumentOutOfRange_InvalidUserDefinedAceType"));
     }
     this.SetOpaque(opaque);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:CustomAce.cs

示例8: CompoundAce

		public CompoundAce (AceFlags flags, int accessMask, CompoundAceType compoundAceType, SecurityIdentifier sid)
			: base (InheritanceFlags.None, PropagationFlags.None)
		{
			this.compound_ace_type = compoundAceType;
			this.AceFlags = flags;
			this.AccessMask = accessMask;
			this.SecurityIdentifier = sid;
		}
开发者ID:runefs,项目名称:Marvin,代码行数:8,代码来源:CompoundAce.cs

示例9: CommonAce

		public CommonAce (AceFlags flags, AceQualifier qualifier,
				  int accessMask, SecurityIdentifier sid,
				  bool isCallback, byte[] opaque)
				: base (InheritanceFlags.None, PropagationFlags.None, qualifier, isCallback, opaque)
		{
			AccessMask = accessMask;
			SecurityIdentifier = sid;
		}
开发者ID:runefs,项目名称:Marvin,代码行数:8,代码来源:CommonAce.cs

示例10: CustomAce

		public CustomAce (AceType type, AceFlags flags, byte[] opaque)
			: base(type, flags)
		{
			/* FIXME: check length of opaque >
			 * MaxOpaqueLength or !multiple of 4
			 */			
			SetOpaque (opaque);
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:8,代码来源:CustomAce.cs

示例11: KnownAce

 internal KnownAce(AceType type, AceFlags flags, int accessMask, System.Security.Principal.SecurityIdentifier securityIdentifier) : base(type, flags)
 {
     if (securityIdentifier == null)
     {
         throw new ArgumentNullException("securityIdentifier");
     }
     this.AccessMask = accessMask;
     this.SecurityIdentifier = securityIdentifier;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:KnownAce.cs

示例12: GenericAce

		internal GenericAce (AceType type, AceFlags flags)
		{
			if (type > AceType.MaxDefinedAceType) {
				throw new ArgumentOutOfRangeException ("type");
			}
			
			this.ace_type = type;
			this.ace_flags = flags;
		}
开发者ID:kumpera,项目名称:mono,代码行数:9,代码来源:GenericAce.cs

示例13: QualifiedAce

	// Constructor.
	internal QualifiedAce(AceFlags aceFlags, AceType aceType, int accessMask,
						  SecurityIdentifier securityIdentifier,
						  byte[] opaque, AceQualifier aceQualifier,
						  bool isCallback)
			: base(aceFlags, aceType, accessMask, securityIdentifier)
			{
				this.opaque = opaque;
				this.aceQualifier = aceQualifier;
				this.isCallback = isCallback;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:11,代码来源:QualifiedAce.cs

示例14: ObjectAce

		internal ObjectAce (AceType type, AceFlags flags, int accessMask,
		                    SecurityIdentifier sid, ObjectAceFlags objFlags,
		                    Guid objType, Guid inheritedType, byte[] opaque)
			: base(type, flags, opaque)
		{
			AccessMask = accessMask;
			SecurityIdentifier = sid;
			ObjectAceFlags = objFlags;
			ObjectAceType = objType;
			InheritedObjectAceType = inheritedType;
		}
开发者ID:jack-pappas,项目名称:mono,代码行数:11,代码来源:ObjectAce.cs

示例15: VerifyObjectAce

 protected static void VerifyObjectAce(ObjectAce ace, AceFlags aceFlags, AceQualifier qualifier, int accessMask, SecurityIdentifier sid, ObjectAceFlags flags, Guid type, Guid inheritedType, bool isCallback, byte[] opaque)
 {
     Assert.Equal(aceFlags, ace.AceFlags);
     Assert.Equal(accessMask, ace.AccessMask);
     Assert.Equal(sid, ace.SecurityIdentifier);
     Assert.Equal(opaque, ace.GetOpaque());
     Assert.Equal(qualifier, ace.AceQualifier);
     Assert.Equal(isCallback, ace.IsCallback);
     Assert.Equal(flags, ace.ObjectAceFlags);
     Assert.Equal(type, ace.ObjectAceType);
     Assert.Equal(inheritedType, ace.InheritedObjectAceType);
 }
开发者ID:ChuangYang,项目名称:corefx,代码行数:12,代码来源:Ace.Object.Tests.cs


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