SemaphoreAuditRule Constructor

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.

ExceptionCondition
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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft