System.Security.AccessControl.FileSystemSecurity.AuditRuleFactory Method

Initializes a new instance of the System.Security.AccessControl.FileSystemAuditRule class representing the specified audit rule for the specified user.

Syntax

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

Parameters

identityReference
An System.Security.Principal.IdentityReference object that represents a user account.
accessMask
An integer that specifies an access type.
isInherited
true if the access rule is inherited; otherwise, false.
inheritanceFlags
One of the System.Security.AccessControl.InheritanceFlags values that specifies how to propagate access masks to child objects.
propagationFlags
One of the System.Security.AccessControl.PropagationFlags values that specifies how to propagate Access Control Entries (ACEs) to child objects.
flags
One of the System.Security.AccessControl.AuditFlags values that specifies the type of auditing to perform.

Returns

A new System.Security.AccessControl.FileSystemAuditRule object representing the specified audit rule for the specified user.

Remarks

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

The return type of the FileSystemSecurity.AuditRuleFactory(System.Security.Principal.IdentityReference, int, bool, InheritanceFlags, PropagationFlags, AuditFlags) method is the base class, System.Security.AccessControl.AuditRule, but the return value can be cast safely to the derived class.

Requirements

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