Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ RegisterCancellation()

CancellationTokenRegistration System.Net.Http.HttpConnection.RegisterCancellation ( CancellationToken cancellationToken)
inlineprivate

Definition at line 1700 of file HttpConnection.cs.

1701 {
1702 return cancellationToken.Register(delegate(object s)
1703 {
1705 if (weakReference.TryGetTarget(out var target))
1706 {
1707 if (System.Net.NetEventSource.Log.IsEnabled())
1708 {
1709 target.Trace("Cancellation requested. Disposing of the connection.", "RegisterCancellation");
1710 }
1711 target.Dispose();
1712 }
1713 }, _weakThisRef);
1714 }
readonly WeakReference< HttpConnection > _weakThisRef
static readonly System.Net.NetEventSource Log

References System.Net.Http.HttpConnection._weakThisRef, System.cancellationToken, System.Net.NetEventSource.Log, and System.s.

Referenced by System.Net.Http.HttpConnection.ContentLengthReadStream.CompleteCopyToAsync(), System.Net.Http.HttpConnection.ConnectionCloseReadStream.CompleteCopyToAsync(), System.Net.Http.HttpConnection.RawConnectionStream.CompleteCopyToAsync(), System.Net.Http.HttpConnection.ChunkedEncodingReadStream.CopyToAsyncCore(), System.Net.Http.HttpConnection.ConnectionCloseReadStream.ReadAsync(), System.Net.Http.HttpConnection.ContentLengthReadStream.ReadAsync(), System.Net.Http.HttpConnection.RawConnectionStream.ReadAsync(), System.Net.Http.HttpConnection.ChunkedEncodingReadStream.ReadAsyncCore(), System.Net.Http.HttpConnection.SendAsyncCore(), and System.Net.Http.HttpConnection.RawConnectionStream.WaitWithConnectionCancellationAsync().