mscorlib(4.0.0.0) API with additions
ObjectAuditRule.cs
2 
4 {
6  public abstract class ObjectAuditRule : AuditRule
7  {
8  private readonly Guid _objectType;
9 
10  private readonly Guid _inheritedObjectType;
11 
12  private readonly ObjectAceFlags _objectFlags;
13 
16  public Guid ObjectType => _objectType;
17 
20  public Guid InheritedObjectType => _inheritedObjectType;
21 
26  public ObjectAceFlags ObjectFlags => _objectFlags;
27 
40  protected ObjectAuditRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AuditFlags auditFlags)
41  : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, auditFlags)
42  {
43  if (!objectType.Equals(Guid.Empty) && (accessMask & ObjectAce.AccessMaskWithObjectType) != 0)
44  {
45  _objectType = objectType;
46  _objectFlags |= ObjectAceFlags.ObjectAceTypePresent;
47  }
48  else
49  {
50  _objectType = Guid.Empty;
51  }
52  if (!inheritedObjectType.Equals(Guid.Empty) && (inheritanceFlags & InheritanceFlags.ContainerInherit) != 0)
53  {
54  _inheritedObjectType = inheritedObjectType;
55  _objectFlags |= ObjectAceFlags.InheritedObjectAceTypePresent;
56  }
57  else
58  {
59  _inheritedObjectType = Guid.Empty;
60  }
61  }
62  }
63 }
PropagationFlags
Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are signific...
Represents an identity and is the base class for the T:System.Security.Principal.NTAccount and T:Syst...
Represents a combination of a user's identity, an access mask, and audit conditions....
Definition: __Canon.cs:3
ObjectAceFlags ObjectFlags
P:System.Security.AccessControl.ObjectAuditRule.ObjectType and P:System.Security.AccessControl....
Represents a globally unique identifier (GUID).To browse the .NET Framework source code for this type...
Definition: Guid.cs:14
Represents a combination of a user’s identity and an access mask.
Definition: AuditRule.cs:7
Guid InheritedObjectType
Gets the type of child object that can inherit the T:System.Security.AccessControl....
override bool Equals(object o)
Returns a value that indicates whether this instance is equal to a specified object.
Definition: Guid.cs:986
Controls access to Directory Services objects. This class represents an Access Control Entry (ACE) as...
Definition: ObjectAce.cs:6
ObjectAuditRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AuditFlags auditFlags)
Initializes a new instance of the T:System.Security.AccessControl.ObjectAuditRule class.
Guid ObjectType
Gets the type of object to which the T:System.Security.AccessControl.ObjectAuditRule applies.
static readonly Guid Empty
A read-only instance of the T:System.Guid structure whose value is all zeros.
Definition: Guid.cs:126
InheritanceFlags
Inheritance flags specify the semantics of inheritance for access control entries (ACEs).
ObjectAceFlags
Specifies the presence of object types for Access Control Entries (ACEs).
AuditFlags
Specifies the conditions for auditing attempts to access a securable object.
Definition: AuditFlags.cs:5