public override async Task FlushAsync(CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); await ForcedCancellable.FromTask(Inner.FlushAsync(cancellationToken), cancellationToken); }
public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); await ForcedCancellable.FromTask(Inner.WriteAsync(buffer, offset, count, cancellationToken), cancellationToken); }
public override async Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); await ForcedCancellable.FromTask(Inner.CopyToAsync(destination, bufferSize, cancellationToken), cancellationToken); }
public override async Task <int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); return(await ForcedCancellable.FromTask(Inner.ReadAsync(buffer, offset, count, cancellationToken), cancellationToken)); }