SemaphoreAuditRule Constructor (IdentityReference, SemaphoreRights, AuditFlags)

 

Initializes a new instance of the SemaphoreAuditRule class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both.

Namespace:   System.Security.AccessControl
Assembly:  System (in System.dll)

public SemaphoreAuditRule(
	IdentityReference identity,
	SemaphoreRights eventRights,
	AuditFlags flags
)

Parameters

identity
Type: System.Security.Principal.IdentityReference

The user or group the rule applies to. Must be of type SecurityIdentifier or a type such as NTAccount that can be converted to type SecurityIdentifier.

eventRights
Type: System.Security.AccessControl.SemaphoreRights

A bitwise combination of SemaphoreRights values specifying the kinds of access to audit.

flags
Type: System.Security.AccessControl.AuditFlags

A bitwise combination of AuditFlags values specifying whether to audit success, failure, or both.

Exception Condition
ArgumentOutOfRangeException

eventRights specifies an invalid value.

-or-

flags specifies an invalid value.

ArgumentNullException

identity is null.

-or-

eventRights is zero.

ArgumentException

identity is neither of type SecurityIdentifier nor of a type such as NTAccount that can be converted to type SecurityIdentifier.

To create an NTAccount object from a string representing a user or group name, use the NTAccount.NTAccount(String) constructor.

.NET Framework
Available since 2.0
Return to top
Show: