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


C# PropagationFlags类代码示例

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


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

示例1: AccessRuleFactory

		public override AccessRule AccessRuleFactory (IdentityReference identityReference,
							      int accessMask, bool isInherited,
							      InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags,
							      AccessControlType type)
		{
			return new PipeAccessRule (identityReference, (PipeAccessRights)accessMask, type);
		}
开发者ID:nicolas-raoul,项目名称:mono,代码行数:7,代码来源:PipeSecurity.cs

示例2: AccessRuleFactory

		public override sealed AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask,
								     bool isInherited, InheritanceFlags inheritanceFlags,
								     PropagationFlags propagationFlags, AccessControlType type)
		{
			return new FileSystemAccessRule (identityReference, (FileSystemRights) accessMask, isInherited,
							 inheritanceFlags, propagationFlags, type);
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:FileSystemSecurity.cs

示例3: GetEffectiveInheritanceFlags

		internal static ActiveDirectorySecurityInheritance GetEffectiveInheritanceFlags(InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
		{
			ActiveDirectorySecurityInheritance activeDirectorySecurityInheritance = ActiveDirectorySecurityInheritance.None;
			if ((inheritanceFlags & InheritanceFlags.ContainerInherit) != InheritanceFlags.None)
			{
				PropagationFlags propagationFlag = propagationFlags;
				if (propagationFlag == PropagationFlags.None)
				{
					activeDirectorySecurityInheritance = ActiveDirectorySecurityInheritance.All;
					return activeDirectorySecurityInheritance;
				}
				else if (propagationFlag == PropagationFlags.NoPropagateInherit)
				{
					activeDirectorySecurityInheritance = ActiveDirectorySecurityInheritance.SelfAndChildren;
					return activeDirectorySecurityInheritance;
				}
				else if (propagationFlag == PropagationFlags.InheritOnly)
				{
					activeDirectorySecurityInheritance = ActiveDirectorySecurityInheritance.Descendents;
					return activeDirectorySecurityInheritance;
				}
				else if (propagationFlag == (PropagationFlags.NoPropagateInherit | PropagationFlags.InheritOnly))
				{
					activeDirectorySecurityInheritance = ActiveDirectorySecurityInheritance.Children;
					return activeDirectorySecurityInheritance;
				}
				throw new ArgumentException("propagationFlags");
			}
			return activeDirectorySecurityInheritance;
		}
开发者ID:nickchal,项目名称:pash,代码行数:30,代码来源:ActiveDirectoryInheritanceTranslator.cs

示例4: base

	public FileSystemAuditRule
				(String identity, FileSystemRights fileSystemRights,
				 InheritanceFlags inheritanceFlags,
				 PropagationFlags propagationFlags, AuditFlags auditFlags)
			: base(IdentityReference.IdentityFromName(identity),
				   (int)fileSystemRights, false, inheritanceFlags,
				   propagationFlags, auditFlags) {}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:FileSystemAuditRule.cs

示例5: AddAccess

 public void AddAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
 {
     base.CheckAccessType(accessType);
     base.CheckFlags(inheritanceFlags, propagationFlags);
     this.everyOneFullAccessForNullDacl = false;
     base.AddQualifiedAce(sid, (accessType == AccessControlType.Allow) ? AceQualifier.AccessAllowed : AceQualifier.AccessDenied, accessMask, GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), ObjectAceFlags.None, Guid.Empty, Guid.Empty);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:DiscretionaryAcl.cs

示例6: base

	public RegistryAuditRule
				(String identity, RegistryRights registryRights,
				 InheritanceFlags inheritanceFlags,
				 PropagationFlags propagationFlags, AuditFlags auditFlags)
			: base(IdentityReference.IdentityFromName(identity),
				   (int)registryRights, false, inheritanceFlags,
				   propagationFlags, auditFlags) {}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:RegistryAuditRule.cs

示例7: AuditRuleFactory

		public override sealed AuditRule AuditRuleFactory (IdentityReference identityReference,
								   int accessMask, bool isInherited,
								   InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags,
								   AuditFlags flags)
		{
			return new PipeAuditRule (identityReference, (PipeAccessRights)accessMask, flags);
		}
开发者ID:nicolas-raoul,项目名称:mono,代码行数:7,代码来源:PipeSecurity.cs

示例8: AccessRule

		protected AccessRule (IdentityReference identity,
				      int accessMask,
				      bool isInherited,
				      InheritanceFlags inheritanceFlags,
				      PropagationFlags propagationFlags,
				      AccessControlType type)
			: base (identity, accessMask, isInherited,
				inheritanceFlags, propagationFlags)
		{
			if (!(identity is SecurityIdentifier)) {
				throw new ArgumentException ("identity");
			}
			if (type < AccessControlType.Allow ||
			    type > AccessControlType.Deny) {
				throw new ArgumentException ("type");
			}
			
			
			if (accessMask == 0) {
				/* FIXME: check inheritance and
				 * propagation flags too
				 */
				throw new ArgumentOutOfRangeException ();
			}
		
			this.type = type;
		}
开发者ID:runefs,项目名称:Marvin,代码行数:27,代码来源:AccessRule.cs

示例9: base

	public FileSystemAccessRule
				(String identity, FileSystemRights fileSystemRights,
				 InheritanceFlags inheritanceFlags,
				 PropagationFlags propagationFlags, AccessControlType type)
			: base(IdentityReference.IdentityFromName(identity),
				   (int)fileSystemRights, false, inheritanceFlags,
				   propagationFlags, type) {}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:FileSystemAccessRule.cs

示例10: base

	public RegistryAccessRule
				(String identity, RegistryRights registryRights,
				 InheritanceFlags inheritanceFlags,
				 PropagationFlags propagationFlags, AccessControlType type)
			: base(IdentityReference.IdentityFromName(identity),
				   (int)registryRights, false, inheritanceFlags,
				   propagationFlags, type) {}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:RegistryAccessRule.cs

示例11: AddDirectorySecurity

		private static void AddDirectorySecurity(string folderName, string account, FileSystemRights rights, InheritanceFlags inheritance, PropagationFlags propogation, AccessControlType controlType)
		{
			DirectoryInfo directoryInfo = new DirectoryInfo(folderName);
			DirectorySecurity accessControl = directoryInfo.GetAccessControl();
			accessControl.AddAccessRule(new FileSystemAccessRule(account, rights, inheritance, propogation, controlType));
			directoryInfo.SetAccessControl(accessControl);
		}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:InstanceStorePermission.cs

示例12: TestRemoveAudit

        private static bool TestRemoveAudit(SystemAcl systemAcl, RawAcl rawAcl, AuditFlags auditFlag, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, bool removePossible)
        {
            bool result = true;
            bool isRemoved = false;
            byte[] sAclBinaryForm = null;
            byte[] rAclBinaryForm = null;
            isRemoved = systemAcl.RemoveAudit(auditFlag, sid, accessMask, inheritanceFlags, propagationFlags);
            if ((isRemoved == removePossible) &&
                (systemAcl.Count == rawAcl.Count) &&
                (systemAcl.BinaryLength == rawAcl.BinaryLength))
            {
                sAclBinaryForm = new byte[systemAcl.BinaryLength];
                rAclBinaryForm = new byte[rawAcl.BinaryLength];
                systemAcl.GetBinaryForm(sAclBinaryForm, 0);
                rawAcl.GetBinaryForm(rAclBinaryForm, 0);

                if (!Utils.IsBinaryFormEqual(sAclBinaryForm, rAclBinaryForm))
                    result = false;
                //redundant index check
                for (int i = 0; i < systemAcl.Count; i++)
                {
                    if (!Utils.IsAceEqual(systemAcl[i], rawAcl[i]))
                    {
                        result = false;
                        break;
                    }
                }
            }
            else
                result = false;
            return result;
        }
开发者ID:ESgarbi,项目名称:corefx,代码行数:32,代码来源:SystemAcl_RemoveAudit.cs

示例13: TestAddAccess

        private static bool TestAddAccess(DiscretionaryAcl discretionaryAcl, RawAcl rawAcl, AccessControlType accessControlType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
        {
            bool result = true;
            byte[] dAclBinaryForm = null;
            byte[] rAclBinaryForm = null;

            discretionaryAcl.AddAccess(accessControlType, sid, accessMask, inheritanceFlags, propagationFlags);
            if (discretionaryAcl.Count == rawAcl.Count &&
                discretionaryAcl.BinaryLength == rawAcl.BinaryLength)
            {

                dAclBinaryForm = new byte[discretionaryAcl.BinaryLength];
                rAclBinaryForm = new byte[rawAcl.BinaryLength];
                discretionaryAcl.GetBinaryForm(dAclBinaryForm, 0);
                rawAcl.GetBinaryForm(rAclBinaryForm, 0);
                if (!Utils.IsBinaryFormEqual(dAclBinaryForm, rAclBinaryForm))
                    result = false;

                //redundant index check

                for (int i = 0; i < discretionaryAcl.Count; i++)
                {
                    if (!Utils.IsAceEqual(discretionaryAcl[i], rawAcl[i]))
                    {

                        result = false;
                        break;
                    }
                }
            }
            else
                result = false;

            return result;
        }
开发者ID:ChuangYang,项目名称:corefx,代码行数:35,代码来源:DiscretionaryAcl_AddAccess.cs

示例14: AuthorizationRule

		protected internal AuthorizationRule (IdentityReference identity,
						      int accessMask, bool isInherited,
						      InheritanceFlags inheritanceFlags,
						      PropagationFlags propagationFlags)
		{
			if (!(identity is SecurityIdentifier) && !(identity is NTAccount))
				throw new ArgumentException ("identity");

			// Unit testing showed that MS.NET 4.0 actually throws ArgumentException
			// for accessMask == 0, not the ArgumentOutOfRangeException specified.			
			if (accessMask == 0)
				throw new ArgumentException ("accessMask");

			if (0 != (inheritanceFlags & ~(InheritanceFlags.ContainerInherit|InheritanceFlags.ObjectInherit)))
				throw new ArgumentOutOfRangeException ();

			if (0 != (propagationFlags & ~(PropagationFlags.NoPropagateInherit|PropagationFlags.InheritOnly)))
				throw new ArgumentOutOfRangeException ();
			
			this.identity = identity;
			this.accessMask = accessMask;
			this.isInherited = isInherited;
			this.inheritanceFlags = inheritanceFlags;
			this.propagationFlags = propagationFlags;
		}
开发者ID:carrie901,项目名称:mono,代码行数:25,代码来源:AuthorizationRule.cs

示例15: AuditRuleFactory

		public virtual AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask,
							   bool isInherited, InheritanceFlags inheritanceFlags,
							   PropagationFlags propagationFlags, AuditFlags flags,
							   Guid objectType, Guid inheritedObjectType)
		{
			throw GetNotImplementedException ();
		}
开发者ID:jack-pappas,项目名称:mono,代码行数:7,代码来源:DirectoryObjectSecurity.cs


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