1 write to _httpContext
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
71
_httpContext
= httpContext;
35 references to _httpContext
Microsoft.AspNetCore.Components.Endpoints (35)
Rendering\EndpointHtmlRenderer.cs (4)
65
internal HttpContext? HttpContext =>
_httpContext
;
69
if (
_httpContext
is null)
73
else if (
_httpContext
!= httpContext)
164
_resourceCollection ??= GetResourceCollection(
_httpContext
) ?? base.Assets;
Rendering\EndpointHtmlRenderer.EventDispatch.cs (14)
75
_httpContext
.Response.StatusCode = 400;
76
_httpContext
.Response.ContentType = "text/plain";
77
return
_httpContext
.RequestServices.GetService<IHostEnvironment>()?.IsDevelopment() == true
78
?
_httpContext
.Response.WriteAsync(detailedMessage)
84
if (
_httpContext
.Response.HasStarted ||
87
HttpMethods.IsPost(
_httpContext
.Request.Method))
94
await using var writer = new HttpResponseStreamWriter(
_httpContext
.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
96
HandleNotFoundAfterResponseStarted(bufferWriter,
_httpContext
, _notFoundUrl);
101
_httpContext
.Response.StatusCode = StatusCodes.Status404NotFound;
115
var pathFormat =
_httpContext
.Items[nameof(StatusCodePagesOptions)] as string;
128
if (
_httpContext
.Response.HasStarted)
131
await using var writer = new HttpResponseStreamWriter(
_httpContext
.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
133
HandleNavigationAfterResponseStarted(bufferWriter,
_httpContext
, uri);
138
await HandleNavigationBeforeResponseStarted(
_httpContext
, uri);
Rendering\EndpointHtmlRenderer.Prerendering.cs (4)
41
return new SSRRenderModeBoundary(
_httpContext
, componentType, renderMode);
123
: new SSRRenderModeBoundary(
_httpContext
, componentType, prerenderMode);
158
return await HandleNavigationException(
_httpContext
, navigationException);
240
await HandleNavigationException(
_httpContext
, navigationException);
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (6)
23
var manager =
_httpContext
.RequestServices.GetRequiredService<ComponentStatePersistenceManager>();
44
InteractiveServerRenderMode => new ProtectedPrerenderComponentApplicationStore(
_httpContext
.RequestServices.GetRequiredService<IDataProtectionProvider>()),
65
var serverStore = new ProtectedPrerenderComponentApplicationStore(
_httpContext
.RequestServices.GetRequiredService<IDataProtectionProvider>());
118
switch (GetPersistStateRenderMode(
_httpContext
))
136
var manager =
_httpContext
.RequestServices.GetRequiredService<ComponentStatePersistenceManager>();
143
var protectedStore = new ProtectedPrerenderComponentApplicationStore(
_httpContext
.RequestServices.GetRequiredService<IDataProtectionProvider>());
Rendering\EndpointHtmlRenderer.Streaming.cs (7)
89
HandleExceptionAfterResponseStarted(
_httpContext
, writer, ex);
91
await
_httpContext
.Response.CompleteAsync();
153
var isEnhancedNavigation = IsProgressivelyEnhancedNavigation(
_httpContext
.Request);
279
var marker = boundary.ToMarker(
_httpContext
, sequenceAndKey.Sequence, sequenceAndKey.Key);
282
if (!
_httpContext
.Response.HasStarted && marker.Type is ComponentMarker.ServerMarkerType or ComponentMarker.AutoMarkerType)
284
_httpContext
.Response.Headers.CacheControl = "no-cache, no-store, max-age=0";
289
if (
_httpContext
.RequestServices.GetRequiredService<WebAssemblySettingsEmitter>().TryGetSettingsOnce(out var settings))