23 [SupportedOSPlatform(
"windows")]
29 Unsafe.SkipInit(out uint result);
30 if (!global::Interop.Kernel32.GetNamedPipeHandleStateW(base.InternalHandle,
null, &result,
null,
null,
null, 0u))
70 if (serverName ==
null)
74 if (pipeName.Length == 0)
78 if (serverName.Length == 0)
86 if (impersonationLevel < TokenImpersonationLevel.None || impersonationLevel >
TokenImpersonationLevel.Delegation)
90 if (inheritability < HandleInheritability.None || inheritability >
HandleInheritability.Inheritable)
96 base.IsCurrentUserOnly =
true;
108 if (safePipeHandle ==
null)
201 base.CheckPipePropertyOperations();
202 if (base.State ==
PipeState.WaitingToConnect)
236 num2 |=
int.MinValue;
246 if (lastPInvokeError != 231 && lastPInvokeError != 2)
253 if (lastPInvokeError == 2 || lastPInvokeError == 121)
263 if (lastPInvokeError == 231)
278 if (!base.IsCurrentUserOnly)
static Exception GetPipeNotOpen()
NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction, PipeOptions options, TokenImpersonationLevel impersonationLevel)
readonly TokenImpersonationLevel _impersonationLevel
NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction, PipeOptions options)
void ValidateRemotePipeUser()
NamedPipeClientStream(string serverName, string pipeName)
NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction, PipeOptions options, TokenImpersonationLevel impersonationLevel, HandleInheritability inheritability)
void ConnectInternal(int timeout, CancellationToken cancellationToken, int startTime)
readonly PipeOptions _pipeOptions
void Connect(int timeout)
readonly PipeDirection _direction
bool TryConnect(int timeout, CancellationToken cancellationToken)
Task ConnectAsync(int timeout, CancellationToken cancellationToken)
NamedPipeClientStream(string serverName, string pipeName, PipeDirection direction)
NamedPipeClientStream(PipeDirection direction, bool isAsync, bool isConnected, SafePipeHandle safePipeHandle)
Task ConnectAsync(int timeout)
readonly HandleInheritability _inheritability
Task ConnectAsync(CancellationToken cancellationToken)
void CheckConnectOperationsClient()
unsafe int NumberOfServerInstances
NamedPipeClientStream(string pipeName)
readonly string _normalizedPipePath
override void CheckPipePropertyOperations()
void ValidateHandleIsPipe(SafePipeHandle safePipeHandle)
Exception WinIOError(int errorCode)
static string GetPipePath(string serverName, string pipeName)
void InitializeHandle(SafePipeHandle? handle, bool isExposed, bool isAsync)
static unsafe global::Interop.Kernel32.SECURITY_ATTRIBUTES GetSecAttrs(HandleInheritability inheritability)
static Exception GetExceptionForWin32Error(int errorCode, string path="")
static int GetLastPInvokeError()
static string ArgumentOutOfRange_OptionsInvalid
static string ArgumentOutOfRange_ImpersonationInvalid
static string Argument_EmptyServerName
static string ArgumentOutOfRange_HandleInheritabilityNoneOrInheritable
static string ArgumentOutOfRange_InvalidTimeout
static string InvalidOperation_PipeAlreadyConnected
static string ArgumentNull_ServerName
static string Argument_InvalidHandle
static string Argument_NeedNonemptyPipeName
static string InvalidOperation_PipeNotYetConnected
static string IO_PipeBroken
static string UnauthorizedAccess_NotOwnedByCurrentUser
IdentityReference? GetOwner(Type targetType)
static WindowsIdentity GetCurrent()
static Task FromCanceled(CancellationToken cancellationToken)
static Task Run(Action action)
static readonly IntPtr Zero
static CancellationToken None