37 writes to HttpContext
Microsoft.AspNetCore.Diagnostics (3)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
230HttpContext = httpContext,
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
193HttpContext = context,
StatusCodePage\StatusCodePagesOptions.cs (1)
29!await problemDetailsService.TryWriteAsync(new() { HttpContext = context.HttpContext, ProblemDetails = { Status = statusCode } }))
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
ProblemDetailsContextTests.cs (1)
15ProblemDetailsContext context = new() { HttpContext = new DefaultHttpContext() };
Microsoft.AspNetCore.Http.Extensions.Tests (22)
ProblemDetailsDefaultWriterTest.cs (19)
40HttpContext = context, 78HttpContext = context, 110HttpContext = context, 143HttpContext = context, 185HttpContext = context, 225HttpContext = context, 264HttpContext = context, 307HttpContext = context, 350HttpContext = context, 393HttpContext = context, 436HttpContext = context, 470HttpContext = context, 516HttpContext = context, 555await writer.WriteAsync(new ProblemDetailsContext() { HttpContext = context }); 589HttpContext = context, 621HttpContext = context, 650var result = writer.CanWrite(new() { HttpContext = context }); 667var result = writer.CanWrite(new() { HttpContext = context }); 729HttpContext = context,
ProblemDetailsServiceTest.cs (3)
56var result = await service.TryWriteAsync(new() { HttpContext = context, AdditionalMetadata = metadata }); 106var result = await service.TryWriteAsync(new() { HttpContext = context }); 126var result = await service.TryWriteAsync(new() { HttpContext = context });
Microsoft.AspNetCore.Http.Results (2)
ProblemHttpResult.cs (1)
63if (problemDetailsService is null || !await problemDetailsService.TryWriteAsync(new() { HttpContext = httpContext, ProblemDetails = ProblemDetails }))
ValidationProblem.cs (1)
63if (problemDetailsService is null || !await problemDetailsService.TryWriteAsync(new() { HttpContext = httpContext, ProblemDetails = ProblemDetails }))
Microsoft.AspNetCore.Mvc.Core (3)
Formatters\TextOutputFormatter.cs (1)
137HttpContext = context.HttpContext,
Infrastructure\DefaultProblemDetailsFactory.cs (1)
111_configure?.Invoke(new() { HttpContext = httpContext!, ProblemDetails = problemDetails });
Infrastructure\ObjectResultExecutor.cs (1)
108HttpContext = context.HttpContext,
Microsoft.AspNetCore.Mvc.Core.Test (5)
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (5)
36HttpContext = context, 73HttpContext = context, 106HttpContext = context, 130var result = writer.CanWrite(new() { HttpContext = context }); 145var result = writer.CanWrite(new() { HttpContext = context });
Microsoft.AspNetCore.Routing (1)
ValidationEndpointFilterFactory.cs (1)
105HttpContext = context.HttpContext,
14 references to HttpContext
Microsoft.AspNetCore.Diagnostics.Tests (2)
DeveloperExceptionPageMiddlewareTest.cs (2)
86var feature = context.HttpContext.Features.Get<IExceptionHandlerFeature>(); 145var feature = context.HttpContext.Features.Get<IExceptionHandlerPathFeature>();
Microsoft.AspNetCore.Http.Abstractions (2)
ProblemDetails\IProblemDetailsService.cs (1)
42return context.HttpContext.Response.HasStarted;
ProblemDetails\ProblemDetailsContext.cs (1)
16/// The <see cref="HttpContext"/> associated with the current request being processed by the filter.
Microsoft.AspNetCore.Http.Extensions (3)
DefaultProblemDetailsWriter.cs (2)
28var httpContext = context.HttpContext; 55var httpContext = context.HttpContext;
ProblemDetailsService.cs (1)
30ArgumentNullException.ThrowIfNull(context.HttpContext);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ProblemDetailsServiceTest.cs (2)
158context.HttpContext.GetEndpoint()?.Metadata.GetMetadata<SampleMetadata>(); 165=> new(context.HttpContext.Response.WriteAsJsonAsync(_content));
Microsoft.AspNetCore.Mvc.Core (5)
Infrastructure\DefaultApiProblemDetailsWriter.cs (5)
38context.HttpContext.GetEndpoint()?.Metadata.GetMetadata<ControllerAttribute>(); 46context.HttpContext.GetEndpoint()?.Metadata.GetMetadata<IApiBehaviorMetadata>(); 57context.HttpContext, 58context.ProblemDetails.Status ?? context.HttpContext.Response.StatusCode, 73context.HttpContext,