AnonymousPipeServerStream Constructor (PipeDirection, HandleInheritability, Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the AnonymousPipeServerStream class with the specified pipe direction, inheritability mode, and buffer size.

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

public AnonymousPipeServerStream(
	PipeDirection direction,
	HandleInheritability inheritability,
	int bufferSize
)

Parameters

direction
Type: System.IO.Pipes.PipeDirection

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

Anonymous pipes can only be in one direction, so direction cannot be set to InOut.

inheritability
Type: System.IO.HandleInheritability

One of the enumeration values that determines whether the underlying handle can be inherited by child processes. Must be set to either None or Inheritable.

bufferSize
Type: System.Int32

The size of the buffer. This value must be greater than or equal to 0.

Exception Condition
ArgumentOutOfRangeException

inheritability is not set to either None or Inheritable.

-or-

bufferSize is less than 0.

NotSupportedException

direction is set to InOut.

A PipeDirection value of InOut is not supported because anonymous pipes are defined to be one-way.

This constructor creates an AnonymousPipeServerStream object without pipe security.

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: