PipeSecurity.AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType) 方法

定义

用指定的值初始化 AccessRule 类的新实例。Initializes a new instance of the AccessRule class with the specified values.

public:
 override System::Security::AccessControl::AccessRule ^ AccessRuleFactory(System::Security::Principal::IdentityReference ^ identityReference, int accessMask, bool isInherited, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags, System::Security::AccessControl::AccessControlType type);
public override System.Security.AccessControl.AccessRule AccessRuleFactory (System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags, System.Security.AccessControl.AccessControlType type);
override this.AccessRuleFactory : System.Security.Principal.IdentityReference * int * bool * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags * System.Security.AccessControl.AccessControlType -> System.Security.AccessControl.AccessRule

参数

identityReference
IdentityReference

应用访问规则的标识。The identity that the access rule applies to. 它必须是可以转换为 SecurityIdentifier 对象的对象。It must be an object that can be cast as a SecurityIdentifier object.

accessMask
Int32

此规则的访问掩码。The access mask of this rule. 访问掩码是 32 位的匿名位集合,其含义由单个集成者定义The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators

isInherited
Boolean

如果此规则继承自父容器,则为 true;否则为 falsetrue if this rule is inherited from a parent container; otherwise, false.

inheritanceFlags
InheritanceFlags

InheritanceFlags 值之一,指定访问规则的继承属性。One of the InheritanceFlags values that specifies the inheritance properties of the access rule.

propagationFlags
PropagationFlags

PropagationFlags 值之一,指定是否自动传播继承的访问规则。One of the PropagationFlags values that specifies whether inherited access rules are automatically propagated. 如果将 inheritanceFlags 设置为 None,则忽略传播标志。The propagation flags are ignored if inheritanceFlags is set to None.

type
AccessControlType

指定有效的访问控制类型。Specifies the valid access control type.

返回

此方法创建的 AccessRule 对象。The AccessRule object that this method creates.

异常

accessMaskinheritanceFlagspropagationFlagstype 指定了一个无效值。accessMask, inheritanceFlags, propagationFlags, or type specifies an invalid value.

identityReferencenullidentityReference is null.

-or- accessMask 为零。accessMask is zero.

identityReference 既不属于 SecurityIdentifier 类型,也不属于可以转换为 SecurityIdentifier 类型的类型(如 NTAccount)。identityReference is neither of type SecurityIdentifier nor of a type, such as NTAccount, that can be converted to type SecurityIdentifier.

注解

创建访问控制规则的建议方法是使用PipeAccessRule类的构造函数。The recommended way to create access control rules is to use the constructors of the PipeAccessRule class.

适用于