AuthorizationRule(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags) 构造函数

定义

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

protected public:
 AuthorizationRule(System::Security::Principal::IdentityReference ^ identity, int accessMask, bool isInherited, System::Security::AccessControl::InheritanceFlags inheritanceFlags, System::Security::AccessControl::PropagationFlags propagationFlags);
protected internal AuthorizationRule (System.Security.Principal.IdentityReference identity, int accessMask, bool isInherited, System.Security.AccessControl.InheritanceFlags inheritanceFlags, System.Security.AccessControl.PropagationFlags propagationFlags);
new System.Security.AccessControl.AuthorizationRule : System.Security.Principal.IdentityReference * int * bool * System.Security.AccessControl.InheritanceFlags * System.Security.AccessControl.PropagationFlags -> System.Security.AccessControl.AuthorizationRule
Protected Friend Sub New (identity As IdentityReference, accessMask As Integer, isInherited As Boolean, inheritanceFlags As InheritanceFlags, propagationFlags As PropagationFlags)

参数

identity
IdentityReference

访问规则应用到其中的标识。The identity to which the access rule applies. 此参数必须是可强制转换为 SecurityIdentifier的对象。This parameter must be an object that can be cast as a SecurityIdentifier.

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

若要从父容器中继承此规则,则为truetrue to inherit this rule from a parent container.

inheritanceFlags
InheritanceFlags

访问规则的继承属性。The inheritance properties of the access rule.

propagationFlags
PropagationFlags

是否会自动传播继承的访问规则。Whether inherited access rules are automatically propagated. 如果将 inheritanceFlags 设置为 None,则忽略传播标志。The propagation flags are ignored if inheritanceFlags is set to None.

例外

无法将 identity 参数的值强制转换为 SecurityIdentifierThe value of the identity parameter cannot be cast as a SecurityIdentifier.

accessMask 参数的值为零,或 inheritanceFlagspropagationFlags 参数包含无法识别的标志值。The value of the accessMask parameter is zero, or the inheritanceFlags or propagationFlags parameters contain unrecognized flag values.

适用于