Ejemplo n.º 1
0
 public override async Task FlushAsync(CancellationToken cancellationToken)
 {
     cancellationToken.ThrowIfCancellationRequested();
     await ForcedCancellable.FromTask(Inner.FlushAsync(cancellationToken), cancellationToken);
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public override async Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
 {
     cancellationToken.ThrowIfCancellationRequested();
     await ForcedCancellable.FromTask(Inner.CopyToAsync(destination, bufferSize, cancellationToken), cancellationToken);
 }
Ejemplo n.º 4
0
 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));
 }