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