Click or drag to resize
ReadBufferReadAsync Method (Byte, Int32, Int32, CancellationToken)
Asynchronously reads bytes from the buffer by calling the callback specified during construction at most once.

Namespace: Lawo.IO
Assembly: Lawo (in Lawo.dll) Version: 1.4.1707.27006
Syntax
C#
public Task<int> ReadAsync(
	byte[] buffer,
	int offset,
	int count,
	CancellationToken cancellationToken
)

Parameters

buffer
Type: SystemByte
offset
Type: SystemInt32
count
Type: SystemInt32
cancellationToken
Type: System.ThreadingCancellationToken

Return Value

Type: TaskInt32
A task that represents the asynchronous operation. The value of the Result property contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the stream has been reached.
Exceptions
ExceptionCondition
ArgumentExceptionThe length of buffer is less than offset plus count.
ArgumentNullExceptionbuffer equals null.
ArgumentOutOfRangeExceptionoffset and/or count are negative.
InvalidOperationExceptionThe ReadBuffer object was created by calling ReadBuffer(ReadCallback, Int32).
Remarks
The callback specified during construction is only called if Index equals Count.
See Also