Beispiel #1
0
 public override Task FlushAsync(CancellationToken cancellationToken)
 {
     if (closedCancelSource.IsCancellationRequested)
     {
         throw new ObjectDisposedException(GetType().Name);
     }
     if (WriteStream == null)
     {
         return(Task.FromResult(0));
     }
     return(WaitOrCancelTask(ct => WriteStream.FlushAsync(ct), WriteTimeout, cancellationToken));
 }
Beispiel #2
0
 public override Task FlushAsync(CancellationToken cancellationToken)
 {
     return(WriteStream.FlushAsync(cancellationToken));
 }
Beispiel #3
0
 public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken)
 {
     return(System.Threading.Tasks.Task.WhenAll(ReadStream.FlushAsync(cancellationToken), WriteStream.FlushAsync(cancellationToken)));
 }