mscorlib(4.0.0.0) API with additions
PipeAuditRule.cs
4 
5 namespace System.IO.Pipes
6 {
8  [HostProtection(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
9  public sealed class PipeAuditRule : AuditRule
10  {
13  public PipeAccessRights PipeAccessRights => PipeAccessRule.RightsFromAccessMask(base.AccessMask);
14 
20  : this(identity, AccessMaskFromRights(rights), isInherited: false, flags)
21  {
22  }
23 
28  public PipeAuditRule(string identity, PipeAccessRights rights, AuditFlags flags)
29  : this(new NTAccount(identity), AccessMaskFromRights(rights), isInherited: false, flags)
30  {
31  }
32 
33  internal PipeAuditRule(IdentityReference identity, int accessMask, bool isInherited, AuditFlags flags)
34  : base(identity, accessMask, isInherited, InheritanceFlags.None, PropagationFlags.None, flags)
35  {
36  }
37 
38  private static int AccessMaskFromRights(PipeAccessRights rights)
39  {
40  if (rights < (PipeAccessRights)0 || rights > (PipeAccessRights.ReadData | PipeAccessRights.WriteData | PipeAccessRights.ReadAttributes | PipeAccessRights.WriteAttributes | PipeAccessRights.ReadExtendedAttributes | PipeAccessRights.WriteExtendedAttributes | PipeAccessRights.CreateNewInstance | PipeAccessRights.Delete | PipeAccessRights.ReadPermissions | PipeAccessRights.ChangePermissions | PipeAccessRights.TakeOwnership | PipeAccessRights.Synchronize | PipeAccessRights.AccessSystemSecurity))
41  {
42  throw new ArgumentOutOfRangeException("rights", System.SR.GetString("ArgumentOutOfRange_NeedValidPipeAccessRights"));
43  }
44  return (int)rights;
45  }
46  }
47 }
Represents an abstraction of an access control entry (ACE) that defines an audit rule for a pipe.
Definition: PipeAuditRule.cs:9
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...
Definition: __Canon.cs:3
The exception that is thrown when the value of an argument is outside the allowable range of values a...
PipeAuditRule(string identity, PipeAccessRights rights, AuditFlags flags)
Initializes a new instance of the T:System.IO.Pipes.PipeAuditRule class for a named user account.
Represents a user or group account.
Definition: NTAccount.cs:10
SecurityAction
Specifies the security actions that can be performed using declarative security.
Represents a combination of a user’s identity and an access mask.
Definition: AuditRule.cs:7
Definition: SR.cs:7
PipeAccessRights PipeAccessRights
Gets the T:System.IO.Pipes.PipeAccessRights flags that are associated with the current T:System....
PipeAuditRule(IdentityReference identity, PipeAccessRights rights, AuditFlags flags)
Initializes a new instance of the T:System.IO.Pipes.PipeAuditRule class for a user account specified ...
PipeAccessRights
Defines the access rights to use when you create access and audit rules.
Represents an abstraction of an access control entry (ACE) that defines an access rule for a pipe.
InheritanceFlags
Inheritance flags specify the semantics of inheritance for access control entries (ACEs).
Indicates that there are no additional parameters.
AuditFlags
Specifies the conditions for auditing attempts to access a securable object.
Definition: AuditFlags.cs:5