C# Class WP8.Async.Helpers.FileStreamExtensions

Show file Open project: tpetrina/wp8-helpers

Public Methods

Method Description
ReadAsync ( this fileStream, byte buffer, int offset, int count, AsyncCallback userCallback, object state ) : Task

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

WriteAsync ( this fileStream, byte buffer, int offset, int count, AsyncCallback userCallback, object state ) : System.Threading.Tasks.Task

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

Method Details

ReadAsync() public static method

Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
public static ReadAsync ( this fileStream, byte buffer, int offset, int count, AsyncCallback userCallback, object state ) : Task
fileStream this The FileStream which will be read from.
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.
userCallback AsyncCallback An optional asynchronous callback, to be called when the read is complete.
state object A user-provided object that distinguishes this particular asynchronous read /// request from other requests.
return Task

WriteAsync() public static method

Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
public static WriteAsync ( this fileStream, byte buffer, int offset, int count, AsyncCallback userCallback, object state ) : System.Threading.Tasks.Task
fileStream this The FileStream which will be read from.
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.
userCallback AsyncCallback An optional asynchronous callback, to be called when the write is complete.
state object A user-provided object that distinguishes this particular asynchronous write /// request from other requests.
return System.Threading.Tasks.Task