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

C# AceFlags类代码示例

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

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



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


示例16: ObjectAce

		public ObjectAce (AceFlags aceFlags, AceQualifier qualifier,
				  int accessMask, SecurityIdentifier sid,
				  ObjectAceFlags flags, Guid type,
				  Guid inheritedType, bool isCallback,
				  byte[] opaque)
			: base (InheritanceFlags.None, PropagationFlags.None, qualifier, isCallback, opaque)
		{
			AceFlags = aceFlags;
			SecurityIdentifier = sid;
			object_ace_flags = flags;
			object_ace_type = type;
			inherited_object_type = inheritedType;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:ObjectAce.cs


示例17: CommonAce

 public CommonAce(AceFlags flags, AceQualifier qualifier, int accessMask, SecurityIdentifier sid, bool isCallback, byte[] opaque);
开发者ID:scott156,项目名称:corefx-progress,代码行数:1,代码来源:System.Security.AccessControl.cs


示例18: CompoundAce

 public CompoundAce(AceFlags flags, int accessMask, CompoundAceType compoundAceType, SecurityIdentifier sid);
开发者ID:scott156,项目名称:corefx-progress,代码行数:1,代码来源:System.Security.AccessControl.cs


示例19: RemoveInheritanceBits

        private static bool RemoveInheritanceBits( AceFlags existing, AceFlags remove, bool isDS, out AceFlags result, out bool total )
        {
            result = 0;
            total = false;

            AF leftAF = AFFromAceFlags( existing, isDS );
            AF rightAF = AFFromAceFlags( remove, isDS );

            PM leftPM = AFtoPM[( int )leftAF];
            PM rightPM = AFtoPM[( int )rightAF];

            if ( leftPM == PM.Invalid || rightPM == PM.Invalid )
            {
                return false; // incorrect ACE flags?
            }

            PM resultPM;
            unchecked { resultPM = leftPM & ~rightPM; }

            //
            // If the resulting propagation matrix is zero,
            // communicate back the fact that removal is "total"
            //

            if ( resultPM == 0 )
            {
                total = true;
                return true;
            }

            AF resultAF = PMtoAF[( int )resultPM];

            if ( resultAF == AF.Invalid )
            {
                return false;
            }
            else
            {
                result = AceFlagsFromAF( resultAF, isDS );
                return true;
            }
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:42,代码来源:ACL.cs


示例20: ObjectAce

	// Constructors
	public ObjectAce(AceFlags aceFlags, AceQualifier qualifier, int accessMask, System.Security.Principal.SecurityIdentifier sid, ObjectAceFlags flags, System.Guid type, System.Guid inheritedType, bool isCallback, byte[] opaque) {}
开发者ID:Pengfei-Gao,项目名称:source-Insight-3-for-centos7,代码行数:2,代码来源:ObjectAce.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Achievement类代码示例发布时间:2022-05-24
下一篇:
C# AccountType类代码示例发布时间: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