BuildMaster SDK Reference
Version:

WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) Method

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

Syntax

public virtual System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken)

Parameters

buffer
Type: byte[]

An array of bytes. This method copies count bytes from buffer to the current stream.

offset
Type: int

The zero-based byte offset in buffer at which to begin copying bytes to the current stream.

count
Type: int

The number of bytes to be written to the current stream.

cancellationToken
Type: System.Threading.CancellationToken

The cancellation token.

Exceptions

System.ObjectDisposedException

Methods were called after the stream was closed.

System.NotSupportedException

The stream does not support writing.

System.ArgumentException

The sum of offset and count is larger than the buffer length.

System.ArgumentNullException

buffer is null (Nothing in Visual Basic).

System.ArgumentOutOfRangeException

offset or count is negative.