當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。