<PackageReference Include="System.Security.AccessControl" Version="4.6.0-preview3.19128.7" />

CommonObjectSecurity

public abstract class CommonObjectSecurity : ObjectSecurity
Controls access to objects without direct manipulation of access control lists (ACLs). This class is the abstract base class for the NativeObjectSecurity class.
protected CommonObjectSecurity(bool isContainer)

Initializes a new instance of the CommonObjectSecurity class.

protected void AddAccessRule(AccessRule rule)

Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

protected void AddAuditRule(AuditRule rule)

Adds the specified audit rule to the System Access Control List (SACL) associated with this CommonObjectSecurity object.

public AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, Type targetType)

Gets a collection of the access rules associated with the specified security identifier.

public AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, Type targetType)

Gets a collection of the audit rules associated with the specified security identifier.

protected bool RemoveAccessRule(AccessRule rule)

Removes access rules that contain the same security identifier and access mask as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

protected void RemoveAccessRuleAll(AccessRule rule)

Removes all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

protected void RemoveAccessRuleSpecific(AccessRule rule)

Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

protected bool RemoveAuditRule(AuditRule rule)

Removes audit rules that contain the same security identifier and access mask as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

protected void RemoveAuditRuleAll(AuditRule rule)

Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

protected void RemoveAuditRuleSpecific(AuditRule rule)

Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

protected void ResetAccessRule(AccessRule rule)

Removes all access rules in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule.

protected void SetAccessRule(AccessRule rule)

Removes all access rules that contain the same security identifier and qualifier as the specified access rule in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule.

protected void SetAuditRule(AuditRule rule)

Removes all audit rules that contain the same security identifier and qualifier as the specified audit rule in the System Access Control List (SACL) associated with this CommonObjectSecurity object and then adds the specified audit rule.