0abdbe5a7d
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
21 lines
837 B
C#
21 lines
837 B
C#
using System.Security.Principal;
|
|
|
|
namespace System.IO.Pipes
|
|
{
|
|
public sealed partial class NamedPipeClientStream
|
|
{
|
|
int _access;
|
|
|
|
public NamedPipeClientStream (string serverName, string pipeName, PipeAccessRights desiredAccessRights, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
|
|
: this (serverName, pipeName, (PipeDirection)(desiredAccessRights & (PipeAccessRights.ReadData | PipeAccessRights.WriteData)), options, impersonationLevel, inheritability)
|
|
{
|
|
if ((desiredAccessRights & ~(PipeAccessRights.FullControl | PipeAccessRights.AccessSystemSecurity)) != 0) {
|
|
throw new ArgumentOutOfRangeException(nameof(desiredAccessRights), SR.ArgumentOutOfRange_InvalidPipeAccessRights);
|
|
}
|
|
|
|
// Referenced from CoreFX code
|
|
_access = (int)desiredAccessRights;
|
|
}
|
|
}
|
|
}
|