System.Security.AccessControl.EventWaitHandleSecurity.AuditRuleFactory Method

Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule.

Syntax

public override AuditRule AuditRuleFactory (System.Security.Principal.IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)

Parameters

identityReference
An System.Security.Principal.IdentityReference that identifies the user or group the rule applies to.
accessMask
A bitwise combination of System.Security.AccessControl.EventWaitHandleRights values specifying the access rights to audit, cast to an integer.
isInherited
Meaningless for named wait handles, because they have no hierarchy.
inheritanceFlags
Meaningless for named wait handles, because they have no hierarchy.
propagationFlags
Meaningless for named wait handles, because they have no hierarchy.
flags
A bitwise combination of System.Security.AccessControl.AuditFlags values specifying whether to audit successful access, failed access, or both.

Returns

An System.Security.AccessControl.EventWaitHandleAuditRule object representing the specified audit rule for the specified user. The return type of the method is the base class, System.Security.AccessControl.AuditRule, but the return value can be cast safely to the derived class.

Remarks

The recommended way to create audit rules is to use the constructors of the System.Security.AccessControl.EventWaitHandleAuditRule class.

Note:

Although inheritance and propagation flags are meaningless for named events, it is still possible to specify them. This is not recommended, because it needlessly complicates the maintenance of rules, for example by interfering with the combination of rules that would otherwise be compatible.

Requirements

Namespace: System.Security.AccessControl
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0