Share via


AuthorizationRule 构造函数

定义

通过使用指定的值初始化 AccessRule 类的新实例。

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

访问规则应用到其中的标识。 此参数必须是可强制转换为 SecurityIdentifier的对象。

accessMask
Int32

此规则的访问掩码。 访问掩码是 32 位的匿名位集合,其含义由单个集成者定义。

isInherited
Boolean

若要从父容器中继承此规则,则为true

inheritanceFlags
InheritanceFlags

访问规则的继承属性。

propagationFlags
PropagationFlags

是否会自动传播继承的访问规则。 如果将 inheritanceFlags 设置为 None,则忽略传播标志。

例外

无法将 identity 参数的值强制转换为 SecurityIdentifier

accessMask 参数的值为零,或 inheritanceFlagspropagationFlags 参数包含无法识别的标志值。

适用于