43 references to CancellationHelper
System.Net.Http (43)
System\Net\Http\HttpClient.cs (1)
621
e = toThrow =
CancellationHelper
.CreateOperationCanceledException(e, cancellationToken.IsCancellationRequested ? cancellationToken : cts.Token);
System\Net\Http\HttpContent.cs (2)
451
if (
CancellationHelper
.ShouldWrapInOperationCanceledException(e, cancellationToken))
453
throw
CancellationHelper
.CreateOperationCanceledException(e, cancellationToken);
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (5)
234
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
236
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
279
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
281
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
410
CancellationHelper
.ThrowIfCancellationRequested(cancellationRegistration.Token);
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (5)
87
if (
CancellationHelper
.ShouldWrapInOperationCanceledException(e, cancellationToken))
89
throw
CancellationHelper
.CreateOperationCanceledException(e, cancellationToken);
106
throw
CancellationHelper
.CreateOperationCanceledException(null, cancellationToken);
141
return
CancellationHelper
.ShouldWrapInOperationCanceledException(exception, cancellationToken) ?
142
CancellationHelper
.CreateOperationCanceledException(exception, cancellationToken) :
System\Net\Http\SocketsHttpHandler\ConnectionCloseReadStream.cs (7)
40
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
62
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
64
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
80
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
123
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
125
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
136
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
716
CancellationHelper
.CreateOperationCanceledException(innerException: null, cancellationToken) :
837
Exception newException =
CancellationHelper
.CreateOperationCanceledException(te, oce.CancellationToken);
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (7)
59
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
87
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
89
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
100
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
152
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
154
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
243
CancellationHelper
.ThrowIfCancellationRequested(ctr.Token);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (2)
357
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
1470
CancellationHelper
.CreateOperationCanceledException(null, cancellationToken)));
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (3)
776
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken); // in case cancellation may have disposed of the stream
906
if (
CancellationHelper
.ShouldWrapInOperationCanceledException(exception, cancellationToken))
917
mappedException =
CancellationHelper
.CreateOperationCanceledException(exception, cancellationToken);
System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs (9)
47
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
69
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
71
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
82
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
125
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
127
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);
138
CancellationHelper
.ThrowIfCancellationRequested(cancellationToken);
216
catch (Exception exc) when (
CancellationHelper
.ShouldWrapInOperationCanceledException(exc, cancellationToken))
218
throw
CancellationHelper
.CreateOperationCanceledException(exc, cancellationToken);