PipeSecurity.AuditRuleFactory Method (IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the AuditRule class with the specified values.

Namespace:   System.IO.Pipes
Assembly:  System.Core (in System.Core.dll)

public override sealed AuditRule AuditRuleFactory(
	IdentityReference identityReference,
	int accessMask,
	bool isInherited,
	InheritanceFlags inheritanceFlags,
	PropagationFlags propagationFlags,
	AuditFlags flags


Type: System.Security.Principal.IdentityReference

The identity that the access rule applies to. It must be an object that can be cast as a SecurityIdentifier object.

Type: System.Int32

The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators

Type: System.Boolean

true if this rule is inherited from a parent container; otherwise, false..

Type: System.Security.AccessControl.InheritanceFlags

One of the InheritanceFlags values that specifies the inheritance properties of the access rule.

Type: System.Security.AccessControl.PropagationFlags

One of the PropagationFlags values that specifies whether inherited access rules are automatically propagated. The propagation flags are ignored if inheritanceFlags is set to None.

Type: System.Security.AccessControl.AuditFlags

One of the AuditFlags values that specifies the valid access control type.

Return Value

Type: System.Security.AccessControl.AuditRule

The AuditRule object that this method creates.

Exception Condition

The accessMask, inheritanceFlags, propagationFlags, or flags properties specify an invalid value.


The identityReference property is null.


The accessMask property is zero.


The identityReference property is neither of type SecurityIdentifier nor of a type, such as NTAccount, that can be converted to type SecurityIdentifier.

The recommended way to create audit rules is to use the constructors of the PipeAuditRule class.

.NET Framework
Available since 3.5
Return to top