SeekableStreamCopyToAsync(Stream, Int32, CancellationToken) - метод
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token.
Пространство имён: Tessa.Platform.IOСборка: Tessa (в Tessa.dll) Версия: 4.0.4
public override Task CopyToAsync(
Stream destination,
int bufferSize,
CancellationToken cancellationToken
)
Public Overrides Function CopyToAsync (
destination As Stream,
bufferSize As Integer,
cancellationToken As CancellationToken
) As Task
public:
virtual Task^ CopyToAsync(
Stream^ destination,
int bufferSize,
CancellationToken cancellationToken
) override
abstract CopyToAsync :
destination : Stream *
bufferSize : int *
cancellationToken : CancellationToken -> Task
override CopyToAsync :
destination : Stream *
bufferSize : int *
cancellationToken : CancellationToken -> Task
- destination Stream
- The stream to which the contents of the current stream will be copied.
- bufferSize Int32
- The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920.
- cancellationToken CancellationToken
- The token to monitor for cancellation requests. The default value is None.
TaskA task that represents the asynchronous copy operation.
ArgumentNullException | destination is . |
ArgumentOutOfRangeException | buffersize is negative or zero. |
ObjectDisposedException | Either the current stream or the destination stream is disposed. |
NotSupportedException | The current stream does not support reading, or the destination stream does not support writing. |