mscorlib(4.0.0.0) API with additions
ObjectAccessRule.cs
2 
4 {
6  public abstract class ObjectAccessRule : AccessRule
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 
25  public ObjectAceFlags ObjectFlags => _objectFlags;
26 
39  protected ObjectAccessRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AccessControlType type)
40  : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, type)
41  {
42  if (!objectType.Equals(Guid.Empty) && (accessMask & ObjectAce.AccessMaskWithObjectType) != 0)
43  {
44  _objectType = objectType;
45  _objectFlags |= ObjectAceFlags.ObjectAceTypePresent;
46  }
47  else
48  {
49  _objectType = Guid.Empty;
50  }
51  if (!inheritedObjectType.Equals(Guid.Empty) && (inheritanceFlags & InheritanceFlags.ContainerInherit) != 0)
52  {
53  _inheritedObjectType = inheritedObjectType;
54  _objectFlags |= ObjectAceFlags.InheritedObjectAceTypePresent;
55  }
56  else
57  {
58  _inheritedObjectType = Guid.Empty;
59  }
60  }
61  }
62 }
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 an access control type (allow or d...
Definition: AccessRule.cs:7
Definition: __Canon.cs:3
Guid InheritedObjectType
Gets the type of child object that can inherit the T:System.Security.AccessControl....
Guid ObjectType
Gets the type of object to which the T:System.Security.AccessControl.ObjectAccessRule applies.
Represents a globally unique identifier (GUID).To browse the .NET Framework source code for this type...
Definition: Guid.cs:14
ObjectAceFlags ObjectFlags
Gets flags that specify if the P:System.Security.AccessControl.ObjectAccessRule.ObjectType and P:Syst...
ObjectAccessRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AccessControlType type)
Initializes a new instance of the T:System.Security.AccessControl.ObjectAccessRule class with the spe...
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
Represents a combination of a user's identity, an access mask, and an access control type (allow or d...
AccessControlType
Specifies whether an T:System.Security.AccessControl.AccessRule object is used to allow or deny acces...
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).