Redigera

Dela via


AccessRule Constructor

Definition

Initializes a new instance of the AccessRule class by using the specified values.

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

Parameters

identity
IdentityReference

The identity to which the access rule applies. This parameter must be an object that can be cast as a SecurityIdentifier.

accessMask
Int32

The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.

isInherited
Boolean

true if this rule is inherited from a parent container.

inheritanceFlags
InheritanceFlags

The inheritance properties of the access rule.

propagationFlags
PropagationFlags

Whether inherited access rules are automatically propagated. The propagation flags are ignored if inheritanceFlags is set to None.

type
AccessControlType

The valid access control type.

Exceptions

The value of the identity parameter cannot be cast as a SecurityIdentifier, or the type parameter contains an invalid value.

The value of the accessMask parameter is zero, or the inheritanceFlags or propagationFlags parameters contain unrecognized flag values.

Notes to Inheritors

This method should not be used by integrators. Integrators should never create inherited rules.

Applies to