Export (0) Print
Expand All

NamedPipeServerStream Constructor (PipeDirection, Boolean, Boolean, SafePipeHandle)

Initializes a new instance of the NamedPipeServerStream class from the specified pipe handle.

Namespace:  System.IO.Pipes
Assembly:  System.Core (in System.Core.dll)

public NamedPipeServerStream(
	PipeDirection direction,
	bool isAsync,
	bool isConnected,
	SafePipeHandle safePipeHandle
)

Parameters

direction
Type: System.IO.Pipes.PipeDirection

One of the enumeration values that determines the direction of the pipe.

isAsync
Type: System.Boolean

true to indicate that the handle was opened asynchronously; otherwise, false.

isConnected
Type: System.Boolean

true to indicate that the pipe is connected; otherwise, false.

safePipeHandle
Type: Microsoft.Win32.SafeHandles.SafePipeHandle

A safe handle for the pipe that this NamedPipeServerStream object will encapsulate.

ExceptionCondition
ArgumentOutOfRangeException

direction is not a valid PipeDirection value.

ArgumentNullException

safePipeHandle is null.

ArgumentException

safePipeHandle is an invalid handle.

IOException

safePipeHandle is not a valid pipe handle.

-or-

The maximum number of server instances has been exceeded.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

  • Demand 

    For full trust for the immediate caller. This member cannot be used by partially trusted code.

Show:
© 2015 Microsoft