Uredi

Deli z drugimi prek


SemaphoreAuditRule(IdentityReference, SemaphoreRights, AuditFlags) Constructor

Definition

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.

public:
 SemaphoreAuditRule(System::Security::Principal::IdentityReference ^ identity, System::Security::AccessControl::SemaphoreRights eventRights, System::Security::AccessControl::AuditFlags flags);
public SemaphoreAuditRule (System.Security.Principal.IdentityReference identity, System.Security.AccessControl.SemaphoreRights eventRights, System.Security.AccessControl.AuditFlags flags);
new System.Security.AccessControl.SemaphoreAuditRule : System.Security.Principal.IdentityReference * System.Security.AccessControl.SemaphoreRights * System.Security.AccessControl.AuditFlags -> System.Security.AccessControl.SemaphoreAuditRule
Public Sub New (identity As IdentityReference, eventRights As SemaphoreRights, flags As AuditFlags)

Parameters

identity
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
SemaphoreRights

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

flags
AuditFlags

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

Exceptions

eventRights specifies an invalid value.

-or-

flags specifies an invalid value.

identity is null.

-or-

eventRights is zero.

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

Remarks

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

Applies to