SemaphoreAuditRule(IdentityReference, SemaphoreRights, AuditFlags) 建構函式

定義

初始化 SemaphoreAuditRule 類別的新執行個體,指定要稽核的使用者或群組、要稽核的權限,以及是要稽核成功、失敗或兩者皆稽核。

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)

參數

identity
IdentityReference

適用這項規則的使用者或群組。 必須是型別 SecurityIdentifier,或是像是可以轉換成型別 NTAccountSecurityIdentifier 的型別。

eventRights
SemaphoreRights

SemaphoreRights 值的位元組合,指定要稽核的存取類型。

flags
AuditFlags

AuditFlags 值的位元組合,指定是否要稽核成功、失敗或兩者皆稽核。

例外狀況

eventRights 指定了無效的值。

-或- flags 指定了無效的值。

identitynull

-或- eventRights 為零。

identity 既不是 SecurityIdentifier 型別,也不是可以轉換成 NTAccount 型別的型別 (例如 SecurityIdentifier)。

備註

若要從代表使用者或組名的字串建立 NTAccount 物件,請使用 建 NTAccount.NTAccount(String) 構函式。

適用於