C# Class NSupport.StreamTaskParallelism

Provides Task Parallel Library usage to wrap Asynchronous Programming Model pattern.
Show file Open project: jittuu/NSupport

Public Methods

Method Description
ReadAsync ( this stream, byte buffer, int offset, int count ) : Task

Begins an asynchronous read operation.

WriteAsync ( this stream, byte buffer, int offset, int count ) : System.Threading.Tasks.Task

Begins an asynchronous write operation.

Method Details

ReadAsync() public static method

Begins an asynchronous read operation.
public static ReadAsync ( this stream, byte buffer, int offset, int count ) : Task
stream this A instance.
buffer byte The buffer to read the data into.
offset int The byte offset in buffer at which to begin writing data read from the stream.
count int The maximum number of bytes to read.
return Task

WriteAsync() public static method

Begins an asynchronous write operation.
public static WriteAsync ( this stream, byte buffer, int offset, int count ) : System.Threading.Tasks.Task
stream this
buffer byte The buffer to write data from.
offset int The byte offset in buffer from which to begin writing.
count int The maximum number of bytes to write.
return System.Threading.Tasks.Task