1 override of RequestAborted
Microsoft.AspNetCore.Http (1)
DefaultHttpContext.cs (1)
184public override CancellationToken RequestAborted
19 writes to RequestAborted
Microsoft.AspNetCore.Http (2)
Timeouts\RequestTimeoutsMiddleware.cs (2)
106context.RequestAborted = linkedCts.Token; 132context.RequestAborted = originalToken;
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
59httpContext.RequestAborted = cts.Token;
Microsoft.AspNetCore.Mvc.Core.Test (5)
Formatters\SystemTextJsonOutputFormatterTest.cs (1)
126actionContext.HttpContext.RequestAborted = cts.Token;
Infrastructure\JsonResultExecutorTestBase.cs (4)
368context.HttpContext.RequestAborted = cts.Token; 399context.HttpContext.RequestAborted = cts.Token; 433context.HttpContext.RequestAborted = cts.Token; 453context.HttpContext.RequestAborted = cts.Token;
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
734outputFormatterContext.HttpContext.RequestAborted = cts.Token;
XmlSerializerOutputFormatterTest.cs (1)
516outputFormatterContext.HttpContext.RequestAborted = cts.Token;
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (8)
NewtonsoftJsonOutputFormatterTest.cs (3)
444actionContext.HttpContext.RequestAborted = cts.Token; 489actionContext.HttpContext.RequestAborted = cts.Token; 523actionContext.HttpContext.RequestAborted = cts.Token;
NewtonsoftJsonResultExecutorTest.cs (1)
39context.HttpContext.RequestAborted = cts.Token;
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (4)
368context.HttpContext.RequestAborted = cts.Token; 399context.HttpContext.RequestAborted = cts.Token; 433context.HttpContext.RequestAborted = cts.Token; 453context.HttpContext.RequestAborted = cts.Token;
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
1049context.RequestAborted = token;
217 references to RequestAborted
AutobahnTestApp (1)
Startup.cs (1)
26await Echo(webSocket, context.RequestAborted);
ExceptionHandlerSample (2)
StartupWithWebSocket.cs (2)
32await ws.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes("Hello")), System.Net.WebSockets.WebSocketMessageType.Text, true, context.RequestAborted); 33await ws.CloseAsync(System.Net.WebSockets.WebSocketCloseStatus.NormalClosure, "done", context.RequestAborted);
IIS.Tests (6)
ClientDisconnectTests.cs (3)
33ctx.RequestAborted.Register(() => requestAborted.SetResult(true)); 74await ctx.Response.Body.WriteAsync(data, ctx.RequestAborted); 329ctx.RequestAborted.Register(() => requestAborted.SetResult(true));
ResponseAbortTests.cs (3)
133tokenAborted = ctx.RequestAborted.IsCancellationRequested; 152var token = ctx.RequestAborted; 158Assert.True(ctx.RequestAborted.WaitHandle.WaitOne(10000));
InMemory.FunctionalTests (25)
ConnectionLimitTests.cs (1)
64while (!context.RequestAborted.IsCancellationRequested)
Http2\Http2ConnectionTests.cs (4)
3037context.RequestAborted.Register(() => 3155context.RequestAborted.Register(() => 4005context.RequestAborted.Register(() => 4107context.RequestAborted.Register(() =>
Http2\Http2StreamTests.cs (8)
3177context.RequestAborted.Register(() => 3210context.RequestAborted.Register(() => 3332context.RequestAborted.Register(() => 3372context.RequestAborted.Register(() => 5455Assert.False(context.RequestAborted.CanBeCanceled); 5537Assert.False(context.RequestAborted.CanBeCanceled); 5619Assert.False(context.RequestAborted.CanBeCanceled); 5703Assert.False(context.RequestAborted.CanBeCanceled);
Http2\Http2TestBase.cs (3)
266context.RequestAborted.Register(() => 289context.RequestAborted.Register(() => 309context.RequestAborted.Register(() =>
Http3\Http3StreamTests.cs (4)
1728Assert.False(context.RequestAborted.CanBeCanceled); 1789Assert.False(context.RequestAborted.CanBeCanceled); 1851Assert.False(context.RequestAborted.CanBeCanceled); 1916Assert.False(context.RequestAborted.CanBeCanceled);
HttpsTests.cs (1)
234var ct = httpContext.RequestAborted;
KeepAliveTimeoutTests.cs (1)
228var ct = httpContext.RequestAborted;
ResponseTests.cs (1)
1200httpContext.RequestAborted.Register(() =>
UpgradeTests.cs (2)
136while (!context.RequestAborted.IsCancellationRequested) 316while (!context.RequestAborted.IsCancellationRequested)
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
154context.RequestAborted.WaitHandle.WaitOne();
Interop.FunctionalTests (10)
Http3\Http3RequestTests.cs (7)
459context.RequestAborted.Register(() => 541context.RequestAborted.Register(() => cancelledTcs.SetResult()); 659context.RequestAborted.Register(() => cancelledTcs.SetResult()); 973context.RequestAborted.Register(() => 1161context.RequestAborted.Register(() => 1864context.RequestAborted.Register(() => requestAbortedTcs.SetResult()); 1975context.RequestAborted.Register(() => requestAbortedTcs.SetResult());
HttpClientHttp2InteropTests.cs (3)
914context.RequestAborted.Register(() => serverResult.SetResult()); 955context.RequestAborted.Register(() => serverResult.SetResult()); 995context.RequestAborted.Register(() => serverResult.SetResult());
Microsoft.AspNetCore.Authentication.Cookies (6)
CookieAuthenticationHandler.cs (6)
172ticket = await Options.SessionStore.RetrieveAsync(claim.Value, Context, Context.RequestAborted); 187await Options.SessionStore.RemoveAsync(_sessionKey!, Context, Context.RequestAborted); 264await Options.SessionStore.RenewAsync(_sessionKey, ticket, Context, Context.RequestAborted); 342await Options.SessionStore.RenewAsync(_sessionKey, ticket, Context, Context.RequestAborted); 346_sessionKey = await Options.SessionStore.StoreAsync(ticket, Context, Context.RequestAborted); 392await Options.SessionStore.RemoveAsync(_sessionKey, Context, Context.RequestAborted);
Microsoft.AspNetCore.Authentication.Facebook (2)
FacebookHandler.cs (2)
53var response = await Backchannel.GetAsync(endpoint, Context.RequestAborted); 59using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.Google (2)
GoogleHandler.cs (2)
50var response = await Backchannel.SendAsync(request, Context.RequestAborted); 56using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerHandler.cs (1)
253var configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
Microsoft.AspNetCore.Authentication.MicrosoftAccount (2)
MicrosoftAccountHandler.cs (2)
46var response = await Backchannel.SendAsync(request, Context.RequestAborted); 52using (var payload = JsonDocument.Parse(await response.Content.ReadAsStringAsync(Context.RequestAborted)))
Microsoft.AspNetCore.Authentication.OAuth (2)
OAuthHandler.cs (2)
222var response = await Backchannel.SendAsync(requestMessage, Context.RequestAborted); 223var body = await response.Content.ReadAsStringAsync(Context.RequestAborted);
Microsoft.AspNetCore.Authentication.OpenIdConnect (9)
OpenIdConnectHandler.cs (9)
123var form = await Request.ReadFormAsync(Context.RequestAborted); 223_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted); 395_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted); 556var form = await Request.ReadFormAsync(Context.RequestAborted); 645_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted); 884var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted); 906var responseContent = await responseMessage.Content.ReadAsStringAsync(Context.RequestAborted); 950var responseMessage = await Backchannel.SendAsync(requestMessage, Context.RequestAborted); 952var userInfoResponse = await responseMessage.Content.ReadAsStringAsync(Context.RequestAborted);
Microsoft.AspNetCore.Authentication.Twitter (5)
TwitterHandler.cs (5)
266return await Backchannel.SendAsync(request, Context.RequestAborted); 275var responseText = await response.Content.ReadAsStringAsync(Context.RequestAborted); 307var responseText = await response.Content.ReadAsStringAsync(Context.RequestAborted); 331var responseText = await response.Content.ReadAsStringAsync(Context.RequestAborted); 370var errorContentStream = await response.Content.ReadAsStreamAsync(Context.RequestAborted);
Microsoft.AspNetCore.Authentication.WsFederation (4)
WsFederationHandler.cs (4)
89_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted); 160var form = await Request.ReadFormAsync(Context.RequestAborted); 386_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted); 422_configuration = await Options.ConfigurationManager.GetConfigurationAsync(Context.RequestAborted);
Microsoft.AspNetCore.Diagnostics (3)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
115if ((ex is OperationCanceledException || ex is IOException) && context.RequestAborted.IsCancellationRequested)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
117if ((edi.SourceException is OperationCanceledException || edi.SourceException is IOException) && context.RequestAborted.IsCancellationRequested) 175handled = await exceptionHandler.TryHandleAsync(context, edi.SourceException, context.RequestAborted);
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
HealthCheckMiddleware.cs (1)
46var result = await _healthCheckService.CheckHealthAsync(_healthCheckOptions.Predicate, httpContext.RequestAborted);
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonTranscodingServerCallContext.cs (1)
170protected override CancellationToken CancellationTokenCore => HttpContext.RequestAborted;
Microsoft.AspNetCore.Http (2)
Timeouts\RequestTimeoutsMiddleware.cs (2)
89if (context.RequestAborted.IsCancellationRequested) 98var originalToken = context.RequestAborted;
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionContext.cs (2)
424TransportTask = transport.ProcessRequestAsync(context, context.RequestAborted); 484var tokenSource = CancellationTokenSource.CreateLinkedTokenSource(Cancellation.Token, nonClonedContext.RequestAborted, timeoutSource.Token);
Internal\Transports\LongPollingServerTransport.cs (1)
75if (context.RequestAborted.IsCancellationRequested)
Microsoft.AspNetCore.Http.Extensions (7)
HttpResponseJsonExtensions.cs (4)
95return WriteAsJsonAsyncSlow(response.Body, value, options, response.HttpContext.RequestAborted); 135await JsonSerializer.SerializeAsync(response.Body, value, jsonTypeInfo, response.HttpContext.RequestAborted); 176await JsonSerializer.SerializeAsync(response.Body, value, jsonTypeInfo, response.HttpContext.RequestAborted); 272return WriteAsJsonAsyncSlow(response.Body, value, type, options, response.HttpContext.RequestAborted);
RequestDelegateFactory.cs (1)
96private static readonly MemberExpression RequestAbortedExpr = Expression.Property(HttpContextExpr, typeof(HttpContext).GetProperty(nameof(HttpContext.RequestAborted))!);
SendFileResponseExtensions.cs (2)
93var localCancel = useRequestAborted ? response.HttpContext.RequestAborted : cancellationToken; 115var localCancel = useRequestAborted ? response.HttpContext.RequestAborted : cancellationToken;
Microsoft.AspNetCore.Http.Extensions.Tests (21)
RequestDelegateGenerator\RequestDelegateCreationTests.cs (2)
284Assert.False(httpContext.RequestAborted.IsCancellationRequested); 315Assert.False(httpContext.RequestAborted.IsCancellationRequested);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (3)
938Assert.False(httpContext.RequestAborted.IsCancellationRequested); 970Assert.False(httpContext.RequestAborted.IsCancellationRequested); 1009Assert.False(httpContext.RequestAborted.IsCancellationRequested);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (1)
482Assert.False(httpContext.RequestAborted.IsCancellationRequested);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (13)
41Assert.False(httpContext.RequestAborted.IsCancellationRequested); 104Assert.False(httpContext.RequestAborted.IsCancellationRequested); 157Assert.False(httpContext.RequestAborted.IsCancellationRequested); 194Assert.False(httpContext.RequestAborted.IsCancellationRequested); 225Assert.False(httpContext.RequestAborted.IsCancellationRequested); 274Assert.False(httpContext.RequestAborted.IsCancellationRequested); 305Assert.False(httpContext.RequestAborted.IsCancellationRequested); 353Assert.False(httpContext.RequestAborted.IsCancellationRequested); 489Assert.False(httpContext.RequestAborted.IsCancellationRequested); 525Assert.False(httpContext.RequestAborted.IsCancellationRequested); 567Assert.False(httpContext.RequestAborted.IsCancellationRequested); 605Assert.False(httpContext.RequestAborted.IsCancellationRequested); 646Assert.False(httpContext.RequestAborted.IsCancellationRequested);
RequestDelegateGenerator\RequestDelegateCreationTests.QueryParameters.cs (1)
77Assert.False(httpContext.RequestAborted.IsCancellationRequested);
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
63Assert.Equal(httpContext.RequestAborted, httpContext.Items["arg"]);
Microsoft.AspNetCore.Http.Microbenchmarks (1)
RequestTimeoutsMiddlewareBenchmark.cs (1)
46context.RequestAborted.ThrowIfCancellationRequested();
Microsoft.AspNetCore.Http.Results (4)
src\Shared\ResultsHelpers\FileResultHelper.cs (4)
39await StreamCopyOperation.CopyToAsync(fileStream, outputStream, count: null, bufferSize: 64 * 1024, cancel: context.RequestAborted); 44await StreamCopyOperation.CopyToAsync(fileStream, outputStream, rangeLength, BufferSize, context.RequestAborted); 64await outputStream.WriteAsync(buffer, context.RequestAborted); 78await outputStream.WriteAsync(buffer.Slice(from, length), context.RequestAborted);
Microsoft.AspNetCore.Http.Tests (3)
Timeouts\RequestTimeoutsMiddlewareTests.cs (3)
266throw new OperationCanceledException(context.RequestAborted); 331Assert.Equal(ctsLinker.ReplacedToken, context.RequestAborted); 335Assert.Equal(originalCancellationToken, context.RequestAborted);
Microsoft.AspNetCore.Identity (2)
AspNetRoleManager.cs (1)
34_cancel = contextAccessor?.HttpContext?.RequestAborted ?? CancellationToken.None;
AspNetUserManager.cs (1)
42_cancel = services?.GetService<IHttpContextAccessor>()?.HttpContext?.RequestAborted ?? CancellationToken.None;
Microsoft.AspNetCore.Identity.UI (2)
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (1)
100passwordHash = await userPasswordStore.GetPasswordHashAsync(user, HttpContext.RequestAborted);
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (1)
100passwordHash = await userPasswordStore.GetPasswordHashAsync(user, HttpContext.RequestAborted);
Microsoft.AspNetCore.Mvc.Core (15)
Formatters\SystemTextJsonOutputFormatter.cs (4)
93await JsonSerializer.SerializeAsync(responseStream, context.Object, jsonTypeInfo, httpContext.RequestAborted); 97await JsonSerializer.SerializeAsync(responseStream, context.Object, SerializerOptions, httpContext.RequestAborted); 100await responseStream.FlushAsync(httpContext.RequestAborted); 102catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { }
Infrastructure\SystemTextJsonResultExecutor.cs (6)
69await JsonSerializer.SerializeAsync(responseStream, value, objectType, jsonSerializerOptions, context.HttpContext.RequestAborted); 70await responseStream.FlushAsync(context.HttpContext.RequestAborted); 72catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { } 83await JsonSerializer.SerializeAsync(transcodingStream, value, objectType, jsonSerializerOptions, context.HttpContext.RequestAborted); 84await transcodingStream.FlushAsync(context.HttpContext.RequestAborted); 86catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested)
ModelBinding\Binders\CancellationTokenModelBinder.cs (1)
24var model = (object)bindingContext.HttpContext.RequestAborted;
src\Shared\ResultsHelpers\FileResultHelper.cs (4)
39await StreamCopyOperation.CopyToAsync(fileStream, outputStream, count: null, bufferSize: 64 * 1024, cancel: context.RequestAborted); 44await StreamCopyOperation.CopyToAsync(fileStream, outputStream, rangeLength, BufferSize, context.RequestAborted); 64await outputStream.WriteAsync(buffer, context.RequestAborted); 78await outputStream.WriteAsync(buffer.Slice(from, length), context.RequestAborted);
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Binders\CancellationTokenModelBinderTests.cs (1)
23Assert.Equal(bindingContext.HttpContext.RequestAborted, bindingContext.Result.Model);
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
XmlDataContractSerializerOutputFormatter.cs (2)
234value = await reader(value, context.HttpContext.RequestAborted); 236if (context.HttpContext.RequestAborted.IsCancellationRequested)
XmlSerializerOutputFormatter.cs (2)
212value = await reader(value, context.HttpContext.RequestAborted); 214if (context.HttpContext.RequestAborted.IsCancellationRequested)
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
BindingSourceMetadataProviderIntegrationTest.cs (1)
43var token = testContext.HttpContext.RequestAborted;
Microsoft.AspNetCore.Mvc.NewtonsoftJson (6)
NewtonsoftJsonOutputFormatter.cs (3)
159value = await reader(value, context.HttpContext.RequestAborted); 161catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { } 163if (context.HttpContext.RequestAborted.IsCancellationRequested)
NewtonsoftJsonResultExecutor.cs (3)
110value = await reader(value, context.HttpContext.RequestAborted); 112catch (OperationCanceledException) when (context.HttpContext.RequestAborted.IsCancellationRequested) { } 113if (context.HttpContext.RequestAborted.IsCancellationRequested)
Microsoft.AspNetCore.OpenApi (3)
Extensions\OpenApiEndpointRouteBuilderExtensions.cs (3)
46var document = await documentService.GetOpenApiDocumentAsync(context.RequestAborted); 54await context.Response.BodyWriter.WriteAsync(output.ToArray(), context.RequestAborted); 55await context.Response.BodyWriter.FlushAsync(context.RequestAborted);
Microsoft.AspNetCore.OutputCaching (2)
OutputCacheMiddleware.cs (2)
103await policy.CacheRequestAsync(context, httpContext.RequestAborted); 170await policy.ServeResponseAsync(context, httpContext.RequestAborted);
Microsoft.AspNetCore.RateLimiting (3)
RateLimitingMiddleware.cs (3)
146await thisRequestOnRejected(new OnRejectedContext() { HttpContext = context, Lease = leaseContext.Lease! }, context.RequestAborted); 159var waitTask = CombinedWaitAsync(context, context.RequestAborted); 237if (ex is OperationCanceledException && context.RequestAborted.IsCancellationRequested)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
228await context.Request.Body.CopyToAsync(ms, context.RequestAborted); 299await context.Request.Body.CopyToAsync(ms, context.RequestAborted); 375await context.Request.Body.CopyToAsync(ms, context.RequestAborted); 474await context.Request.Body.CopyToAsync(ms, context.RequestAborted); 558await context.Request.Body.CopyToAsync(ms, context.RequestAborted); 712await context.Request.Body.CopyToAsync(ms, context.RequestAborted);
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingMiddleware.cs (1)
189await body.CopyToAsync(response.BodyWriter, context.HttpContext.RequestAborted);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
RequestTests.cs (2)
482var ct = httpContext.RequestAborted; 542result.SetResult(httpContext.RequestAborted.IsCancellationRequested);
ResponseSendFileTests.cs (4)
486httpContext.RequestAborted.Register(() => cancellationReceived.SetResult()); 539httpContext.RequestAborted.Register(() => cancellationReceived.SetResult()); 586httpContext.RequestAborted.Register(() => cancellationReceived.SetResult()); 638httpContext.RequestAborted.Register(() => cancellationReceived.SetResult());
ServerTests.cs (2)
284var ct = httpContext.RequestAborted; 317CancellationToken ct = httpContext.RequestAborted;
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyMiddleware.cs (1)
56if (!await _spaProxyLaunchManager.IsSpaProxyRunning(context.RequestAborted))
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
63context.RequestAborted,
Microsoft.AspNetCore.StaticAssets (1)
StaticAssetsInvoker.cs (1)
267public CancellationToken CancellationToken => _context.RequestAborted;
Microsoft.AspNetCore.StaticFiles (2)
StaticFileContext.cs (2)
356await _context.Response.SendFileAsync(_fileInfo, 0, _length, _context.RequestAborted); 389await _context.Response.SendFileAsync(_fileInfo, start, length, _context.RequestAborted);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
256Assert.True(context.RequestAborted.WaitHandle.WaitOne(interval), "not aborted");
Microsoft.AspNetCore.TestHost (1)
WebSocketClient.cs (1)
146await _httpContext.Response.Body.FlushAsync(_httpContext.RequestAborted); // Send headers to the client
Microsoft.AspNetCore.TestHost.Tests (8)
HttpContextBuilderTests.cs (4)
30Assert.True(context.RequestAborted.CanBeCanceled); 223Assert.True(c.RequestAborted.WaitHandle.WaitOne(TimeSpan.FromSeconds(10))); 224c.RequestAborted.ThrowIfCancellationRequested(); 334context.RequestAborted.Register(() => requestAborted.SetResult());
RequestLifetimeTests.cs (1)
21httpContext.RequestAborted.Register(() => requestAborted.SetResult());
ResponseResetTests.cs (1)
72httpContext.RequestAborted.Register(() => requestAborted.SetResult());
TestClientTests.cs (2)
838await sem.WaitAsync(ctx.RequestAborted); 867await Task.Delay(TimeSpan.FromSeconds(30), ctx.RequestAborted);
OpenIdConnectSample (2)
Startup.cs (2)
251var metadata = await options.ConfigurationManager.GetConfigurationAsync(context.RequestAborted); 261var tokenResponse = await options.Backchannel.PostAsync(metadata.TokenEndpoint, content, context.RequestAborted);
RequestDecompressionSample (2)
Startup.cs (2)
24var decompressedBody = await reader.ReadToEndAsync(context.RequestAborted); 26await context.Response.WriteAsync(decompressedBody, context.RequestAborted);
SocialSample (3)
Startup.cs (3)
141var response = await context.Backchannel.SendAsync(request, context.HttpContext.RequestAborted); 202var response = await context.Backchannel.SendAsync(request, context.HttpContext.RequestAborted); 330var refreshResponse = await options.Backchannel.PostAsync(options.TokenEndpoint, content, context.RequestAborted);
Sockets.FunctionalTests (17)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (4)
598var token = context.RequestAborted; 633context.RequestAborted.Register(() => 638beforeAbort = context.RequestAborted; 645afterAbort = context.RequestAborted;
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (13)
301context.RequestAborted.Register(() => requestAborted.SetResult()); 309await context.Response.BodyWriter.WriteAsync(new Memory<byte>(scratchBuffer, 0, scratchBuffer.Length), context.RequestAborted); 368context.RequestAborted.Register(() => requestAborted.SetResult()); 513context.RequestAborted.Register(() => requestAborted.SetResult()); 523await context.Response.BodyWriter.WriteAsync(new Memory<byte>(chunkData, 0, chunkData.Length), context.RequestAborted); 648context.RequestAborted.Register(() => 659await context.Response.BodyWriter.WriteAsync(new Memory<byte>(chunkData, 0, chunkData.Length), context.RequestAborted); 762context.RequestAborted.Register(() => 862context.RequestAborted.Register(() => 869await context.Response.BodyWriter.WriteAsync(new Memory<byte>(chunkData, 0, chunkData.Length), context.RequestAborted); 939context.RequestAborted.Register(() => 1023context.RequestAborted.Register(() => 1030await context.Response.BodyWriter.WriteAsync(new Memory<byte>(chunkData, 0, chunkData.Length), context.RequestAborted);