C# Class PRI.ProductivityExtensions.StreamExtensions.Streamable

Class that contains extension methods that extend Stream
Exibir arquivo Open project: peteraritchie/ProductivityExtensions

Public Methods

Method Description
BeginRead ( this stream, Byte buffer, AsyncCallback callback ) : IAsyncResult

Extends BeginRead so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginRead(buffer, callback);

BeginRead ( this stream, Byte buffer, AsyncCallback callback, Object state ) : IAsyncResult

Extends BeginRead so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginRead(buffer, callback, state);

BeginRead ( this stream, Byte buffer, Int32 offset, Int32 count, AsyncCallback callback ) : IAsyncResult

Extends BeginRead so that when a state object is not needed, null does not need to be passed. stream.BeginRead(buffer, offset, count, callback);

BeginWrite ( this stream, Byte buffer, AsyncCallback callback ) : IAsyncResult

Extends BeginWrite so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginWrite(buffer, callback);

BeginWrite ( this stream, Byte buffer, AsyncCallback callback, Object state ) : IAsyncResult

Extends BeginWrite so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginWrite(buffer, callback, state);

BeginWrite ( this stream, Byte buffer, Int32 offset, Int32 count, AsyncCallback callback ) : IAsyncResult

Extends BeginWrite so that when a state object is not needed, null does not need to be passed. stream.BeginWrite(buffer, offset, count, callback);

Read ( this stream, Byte buffer ) : Int32

Extends Read so that buffer offset of 0 and call to Array.Length are not needed. stream.Read(buffer);

ReadAsync ( this stream, byte buffer ) : Task

Extends ReadAsync so that buffer offset of 0 and call to Array.Length are not needed. socket.ReadAsync(buffer);

Seek ( this stream, SeekOrigin seekOrigin ) : long

Seek with default offset of 0.

Write ( this stream, Byte buffer ) : void

Extends Write so that buffer offset of 0 and call to Array.Length are not needed. stream.Write(buffer);

WriteAsync ( this stream, byte buffer ) : Task

Extends WriteAsync so that buffer offset of 0 and call to Array.Length are not needed. socket.WriteAsync(buffer);

Private Methods

Method Description
BeginReadToEnd ( this stream, byte buffer, AsyncCallback callback ) : IAsyncResult
BeginReadToEnd ( this stream, byte buffer, int offset, int count, AsyncCallback callback, Object state ) : IAsyncResult
BeginReadToEnd ( this stream, byte buffer, int offset, int count, AsyncCallback callback ) : void
EndReadToEnd ( this stream, IAsyncResult ar ) : int
OnRead ( IAsyncResult ar ) : void

Method Details

BeginRead() public static method

Extends BeginRead so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginRead(buffer, callback);
public static BeginRead ( this stream, Byte buffer, AsyncCallback callback ) : IAsyncResult
stream this
buffer Byte
callback AsyncCallback
return IAsyncResult

BeginRead() public static method

Extends BeginRead so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginRead(buffer, callback, state);
public static BeginRead ( this stream, Byte buffer, AsyncCallback callback, Object state ) : IAsyncResult
stream this
buffer Byte
callback AsyncCallback
state Object
return IAsyncResult

BeginRead() public static method

Extends BeginRead so that when a state object is not needed, null does not need to be passed. stream.BeginRead(buffer, offset, count, callback);
public static BeginRead ( this stream, Byte buffer, Int32 offset, Int32 count, AsyncCallback callback ) : IAsyncResult
stream this
buffer Byte
offset System.Int32
count System.Int32
callback AsyncCallback
return IAsyncResult

BeginWrite() public static method

Extends BeginWrite so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginWrite(buffer, callback);
public static BeginWrite ( this stream, Byte buffer, AsyncCallback callback ) : IAsyncResult
stream this
buffer Byte
callback AsyncCallback
return IAsyncResult

BeginWrite() public static method

Extends BeginWrite so that buffer offset of 0 and call to Array.Length are not needed. stream.BeginWrite(buffer, callback, state);
public static BeginWrite ( this stream, Byte buffer, AsyncCallback callback, Object state ) : IAsyncResult
stream this
buffer Byte
callback AsyncCallback
state Object
return IAsyncResult

BeginWrite() public static method

Extends BeginWrite so that when a state object is not needed, null does not need to be passed. stream.BeginWrite(buffer, offset, count, callback);
public static BeginWrite ( this stream, Byte buffer, Int32 offset, Int32 count, AsyncCallback callback ) : IAsyncResult
stream this
buffer Byte
offset System.Int32
count System.Int32
callback AsyncCallback
return IAsyncResult

Read() public static method

Extends Read so that buffer offset of 0 and call to Array.Length are not needed. stream.Read(buffer);
public static Read ( this stream, Byte buffer ) : Int32
stream this
buffer Byte
return System.Int32

ReadAsync() public static method

Extends ReadAsync so that buffer offset of 0 and call to Array.Length are not needed. socket.ReadAsync(buffer);
public static ReadAsync ( this stream, byte buffer ) : Task
stream this
buffer byte
return Task

Seek() public static method

Seek with default offset of 0.
public static Seek ( this stream, SeekOrigin seekOrigin ) : long
stream this to operate on
seekOrigin SeekOrigin to seek to start, /// to seek to end, or to do nothing.
return long

Write() public static method

Extends Write so that buffer offset of 0 and call to Array.Length are not needed. stream.Write(buffer);
public static Write ( this stream, Byte buffer ) : void
stream this
buffer Byte
return void

WriteAsync() public static method

Extends WriteAsync so that buffer offset of 0 and call to Array.Length are not needed. socket.WriteAsync(buffer);
public static WriteAsync ( this stream, byte buffer ) : Task
stream this
buffer byte
return Task