Otter SDK Reference
Version:

CopyToAsync(System.IO.TextReader reader, System.IO.TextWriter writer, int bufferSize, System.Threading.CancellationToken cancellationToken) Method

Copies the text from reader to writer.

Syntax

public static System.Threading.Tasks.Task CopyToAsync(System.IO.TextReader reader, System.IO.TextWriter writer, int bufferSize, System.Threading.CancellationToken cancellationToken)

Parameters

reader
Type: System.IO.TextReader

The source System.IO.TextReader.

writer
Type: System.IO.TextWriter

The destination System.IO.TextWriter.

bufferSize
Type: int

The size of the buffer to use in characters.

cancellationToken
Type: System.Threading.CancellationToken

The cancellation token.

Exceptions

System.ArgumentNullException

reader is null (Nothing in Visual Basic) or writer is null (Nothing in Visual Basic).

System.ArgumentOutOfRangeException

bufferSize is invalid.