C# Class System.IO.Pipes.PipeStream

Inheritance: Stream
显示文件 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
CheckReadWriteArgs void
DebugAssertReadWriteArgs void
GetPipePath string
GetSecAttrs Interop.Kernel32.SECURITY_ATTRIBUTES
Init void
InitializeAsyncHandle void
InitializeHandle void
ReadAsync Task
ReadAsyncCore Task
ReadCore int
ReadFileNative int
UninitializeAsyncHandle void
UpdateMessageCompletion void
UpdateReadMode void
ValidateHandleIsPipe void
WinIOError Exception
WriteAsync Task
WriteAsyncCore Task
WriteCore void
WriteFileNative int

Public Methods

Method Description
BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
BeginRead ( byte buffer, int offset, int count, System callback, object state ) : System.IAsyncResult
BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
BeginWrite ( byte buffer, int offset, int count, System callback, object state ) : System.IAsyncResult
EndRead ( IAsyncResult asyncResult ) : int
EndRead ( System asyncResult ) : int
EndWrite ( IAsyncResult asyncResult ) : void
EndWrite ( System asyncResult ) : void
Flush ( ) : void
Read ( byte buffer, int offset, int count ) : int
ReadAsync ( byte buffer, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
ReadByte ( ) : int
Seek ( long offset, SeekOrigin origin ) : long
Seek ( long offset, System origin ) : long
SetLength ( long value ) : void
WaitForPipeDrain ( ) : void
Write ( byte buffer, int offset, int count ) : void
WriteAsync ( byte buffer, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
WriteByte ( byte value ) : void

Protected Methods

Method Description
CheckPipePropertyOperations ( ) : void
CheckReadOperations ( ) : void
CheckWriteOperations ( ) : void
Dispose ( bool disposing ) : void
InitializeHandle ( Microsoft handle, bool isExposed, bool isAsync ) : void
PipeStream ( System direction, System transmissionMode, int outBufferSize )
PipeStream ( System direction, int bufferSize )
PipeStream ( PipeDirection direction, PipeTransmissionMode transmissionMode, int outBufferSize ) : Microsoft.Win32.SafeHandles
PipeStream ( PipeDirection direction, int bufferSize ) : Microsoft.Win32.SafeHandles

Private Methods

Method Description
CheckReadWriteArgs ( byte buffer, int offset, int count ) : void
DebugAssertReadWriteArgs ( byte buffer, int offset, int count, SafePipeHandle handle ) : void
GetPipePath ( string serverName, string pipeName ) : string
GetSecAttrs ( HandleInheritability inheritability ) : Interop.Kernel32.SECURITY_ATTRIBUTES
Init ( PipeDirection direction, PipeTransmissionMode transmissionMode, int outBufferSize ) : void
InitializeAsyncHandle ( SafePipeHandle handle ) : void

Initializes the handle to be used asynchronously.

InitializeHandle ( SafePipeHandle handle, bool isExposed, bool isAsync ) : void
ReadAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
ReadAsyncCore ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
ReadCore ( byte buffer, int offset, int count ) : int
ReadFileNative ( SafePipeHandle handle, byte buffer, int offset, int count, NativeOverlapped overlapped, int &errorCode ) : int
UninitializeAsyncHandle ( ) : void
UpdateMessageCompletion ( bool completion ) : void
UpdateReadMode ( ) : void
ValidateHandleIsPipe ( SafePipeHandle safePipeHandle ) : void

Throws an exception if the supplied handle does not represent a valid pipe.

WinIOError ( int errorCode ) : Exception
WriteAsync ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
WriteAsyncCore ( byte buffer, int offset, int count, CancellationToken cancellationToken ) : Task
WriteCore ( byte buffer, int offset, int count ) : void
WriteFileNative ( SafePipeHandle handle, byte buffer, int offset, int count, NativeOverlapped overlapped, int &errorCode ) : int

Method Details

BeginRead() public method

public BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte
offset int
count int
callback AsyncCallback
state object
return IAsyncResult

BeginRead() public method

public BeginRead ( byte buffer, int offset, int count, System callback, object state ) : System.IAsyncResult
buffer byte
offset int
count int
callback System
state object
return System.IAsyncResult

BeginWrite() public method

public BeginWrite ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult
buffer byte
offset int
count int
callback AsyncCallback
state object
return IAsyncResult

BeginWrite() public method

public BeginWrite ( byte buffer, int offset, int count, System callback, object state ) : System.IAsyncResult
buffer byte
offset int
count int
callback System
state object
return System.IAsyncResult

CheckPipePropertyOperations() protected method

protected CheckPipePropertyOperations ( ) : void
return void

CheckReadOperations() protected method

protected CheckReadOperations ( ) : void
return void

CheckWriteOperations() protected method

protected CheckWriteOperations ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndRead() public method

public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
return int

EndRead() public method

public EndRead ( System asyncResult ) : int
asyncResult System
return int

EndWrite() public method

public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

EndWrite() public method

public EndWrite ( System asyncResult ) : void
asyncResult System
return void

Flush() public method

public Flush ( ) : void
return void

InitializeHandle() protected method

protected InitializeHandle ( Microsoft handle, bool isExposed, bool isAsync ) : void
handle Microsoft
isExposed bool
isAsync bool
return void

PipeStream() protected method

protected PipeStream ( System direction, System transmissionMode, int outBufferSize )
direction System
transmissionMode System
outBufferSize int

PipeStream() protected method

protected PipeStream ( System direction, int bufferSize )
direction System
bufferSize int

PipeStream() protected method

protected PipeStream ( PipeDirection direction, PipeTransmissionMode transmissionMode, int outBufferSize ) : Microsoft.Win32.SafeHandles
direction PipeDirection
transmissionMode PipeTransmissionMode
outBufferSize int
return Microsoft.Win32.SafeHandles

PipeStream() protected method

protected PipeStream ( PipeDirection direction, int bufferSize ) : Microsoft.Win32.SafeHandles
direction PipeDirection
bufferSize int
return Microsoft.Win32.SafeHandles

Read() public method

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

ReadAsync() public method

public ReadAsync ( byte buffer, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
buffer byte
offset int
count int
cancellationToken System
return System.Threading.Tasks.Task

ReadByte() public method

public ReadByte ( ) : int
return int

Seek() public method

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
return long

Seek() public method

public Seek ( long offset, System origin ) : long
offset long
origin System
return long

SetLength() public method

public SetLength ( long value ) : void
value long
return void

WaitForPipeDrain() public method

public WaitForPipeDrain ( ) : void
return void

Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void

WriteAsync() public method

public WriteAsync ( byte buffer, int offset, int count, System cancellationToken ) : System.Threading.Tasks.Task
buffer byte
offset int
count int
cancellationToken System
return System.Threading.Tasks.Task

WriteByte() public method

public WriteByte ( byte value ) : void
value byte
return void