System.Security.AccessControl.RegistrySecurity.SetAuditRule Method

Removes all audit rules with the same user as the specified rule, regardless of the System.Security.AccessControl.AuditFlags value, and then adds the specified rule.

Syntax

public void SetAuditRule (RegistryAuditRule rule)

Parameters

rule
The System.Security.AccessControl.RegistryAuditRule to add. The user specified by this rule determines the rules to remove before this rule is added.

Remarks

If there are no audit rules whose user matches the specified rule, rule is added.

Requirements

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