Table of Contents

Method CopyToAsync

Namespace
Alternet.UI.Extensions
Assembly
Alternet.UI.Interfaces.dll

CopyToAsync(Stream, Stream, int, IProgress<long>?, CancellationToken)

Copies contents of the stream to another stream using async operations.

public static Task CopyToAsync(this Stream source, Stream destination, int bufferSize, IProgress<long>? progress = null, CancellationToken cancellationToken = default)

Parameters

source Stream

Source stream.

destination Stream

Destination stream.

bufferSize int

Buffer size.

progress IProgress<long>

Progress notification provider. Optional.

cancellationToken CancellationToken

Cancellation Token. Optional.

Returns

Task