Method CopyToAsync
- Namespace
- Alternet.UI.Extensions
- Assembly
- Alternet.UI.Common.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
sourceStreamSource stream.
destinationStreamDestination stream.
bufferSizeintBuffer size.
progressIProgress<long>Progress notification provider. Optional.
cancellationTokenCancellationTokenCancellation Token. Optional.