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.

Exception Condition
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.

Demand

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

.NET Framework
Available since 3.5
Return to top
Show: