public void CancelRead(Task taskToCancell) { try { this.cts.Cancel(); taskToCancell.Wait(this.cts.Token); } catch (OperationCanceledException) { } catch (AggregateException) { } this.ResetCancellationToken(); }