C# Class FirstFloor.ModernUI.Helpers.WrappingStream

Inheritance: Stream
Exibir arquivo Open project: gro-ove/actools

Public Methods

Method Description
BeginRead ( byte buffer, int offset, int count, AsyncCallback callback, object state ) : IAsyncResult

Begins an asynchronous read operation.

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

Begins an asynchronous write operation.

EndRead ( IAsyncResult asyncResult ) : int

Waits for the pending asynchronous read to complete.

EndWrite ( IAsyncResult asyncResult ) : void

Ends an asynchronous write operation.

Flush ( ) : void

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

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

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

ReadByte ( ) : int

Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.

Seek ( long offset, SeekOrigin origin ) : long

Sets the position within the current stream.

SetLength ( long value ) : void

Sets the length of the current stream.

WrappingStream ( Stream streamBase ) : System

Initializes a new instance of the WrappingStream class.

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

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

WriteByte ( byte value ) : void

Writes a byte to the current position in the stream and advances the position within the stream by one byte.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the WrappingStream and optionally releases the managed resources.

Private Methods

Method Description
ThrowIfDisposed ( ) : void

Method Details

BeginRead() public method

Begins an asynchronous read operation.
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

BeginWrite() public method

Begins an asynchronous write operation.
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

Dispose() protected method

Releases the unmanaged resources used by the WrappingStream and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

EndRead() public method

Waits for the pending asynchronous read to complete.
public EndRead ( IAsyncResult asyncResult ) : int
asyncResult IAsyncResult
return int

EndWrite() public method

Ends an asynchronous write operation.
public EndWrite ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

Flush() public method

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
public Flush ( ) : void
return void

Read() public method

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

ReadByte() public method

Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
public ReadByte ( ) : int
return int

Seek() public method

Sets the position within the current stream.
public Seek ( long offset, SeekOrigin origin ) : long
offset long A byte offset relative to the parameter.
origin SeekOrigin A value of type indicating the reference point used to obtain the new position.
return long

SetLength() public method

Sets the length of the current stream.
public SetLength ( long value ) : void
value long The desired length of the current stream in bytes.
return void

WrappingStream() public method

Initializes a new instance of the WrappingStream class.
public WrappingStream ( Stream streamBase ) : System
streamBase Stream The wrapped stream.
return System

Write() public method

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void

WriteByte() public method

Writes a byte to the current position in the stream and advances the position within the stream by one byte.
public WriteByte ( byte value ) : void
value byte
return void