1 write to _httpContext
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
67
_httpContext
= httpContext;
29 references to _httpContext
Microsoft.AspNetCore.Components.Endpoints (29)
Rendering\EndpointHtmlRenderer.cs (4)
61
internal HttpContext? HttpContext =>
_httpContext
;
65
if (
_httpContext
is null)
69
else if (
_httpContext
!= httpContext)
160
_resourceCollection ??= GetResourceCollection(
_httpContext
) ?? base.Assets;
Rendering\EndpointHtmlRenderer.EventDispatch.cs (6)
70
_httpContext
.Response.StatusCode = 400;
71
_httpContext
.Response.ContentType = "text/plain";
72
return
_httpContext
.RequestServices.GetService<IHostEnvironment>()?.IsDevelopment() == true
73
?
_httpContext
.Response.WriteAsync(detailedMessage)
79
if (
_httpContext
.Response.HasStarted)
83
_httpContext
.Response.StatusCode = StatusCodes.Status404NotFound;
Rendering\EndpointHtmlRenderer.Prerendering.cs (3)
39
return new SSRRenderModeBoundary(
_httpContext
, componentType, renderMode);
121
: new SSRRenderModeBoundary(
_httpContext
, componentType, prerenderMode);
156
return 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 (10)
88
HandleExceptionAfterResponseStarted(
_httpContext
, writer, ex);
90
await
_httpContext
.Response.CompleteAsync();
152
var isEnhancedNavigation = IsProgressivelyEnhancedNavigation(
_httpContext
.Request);
267
var marker = boundary.ToMarker(
_httpContext
, sequenceAndKey.Sequence, sequenceAndKey.Key);
270
if (!
_httpContext
.Response.HasStarted && marker.Type is ComponentMarker.ServerMarkerType or ComponentMarker.AutoMarkerType)
272
_httpContext
.Response.Headers.CacheControl = "no-cache, no-store, max-age=0";
277
if (
_httpContext
.RequestServices.GetRequiredService<WebAssemblySettingsEmitter>().TryGetSettingsOnce(out var settings))
323
var preloads =
_httpContext
.GetEndpoint()?.Metadata.GetMetadata<ResourcePreloadCollection>();
326
_httpContext
.Response.Headers.Link = StringValues.Concat(
_httpContext
.Response.Headers.Link, linkHeaders);