1 write to _httpContext
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
69_httpContext = httpContext;
36 references to _httpContext
Microsoft.AspNetCore.Components.Endpoints (36)
Rendering\EndpointHtmlRenderer.cs (4)
63internal HttpContext? HttpContext => _httpContext; 67if (_httpContext is null) 71else if (_httpContext != httpContext) 162_resourceCollection ??= GetResourceCollection(_httpContext) ?? base.Assets;
Rendering\EndpointHtmlRenderer.EventDispatch.cs (13)
73_httpContext.Response.StatusCode = 400; 74_httpContext.Response.ContentType = "text/plain"; 75return _httpContext.RequestServices.GetService<IHostEnvironment>()?.IsDevelopment() == true 76? _httpContext.Response.WriteAsync(detailedMessage) 82if (_httpContext.Response.HasStarted) 85await using var writer = new HttpResponseStreamWriter(_httpContext.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared); 88HandleNavigationAfterResponseStarted(bufferWriter, _httpContext, notFoundUri); 93_httpContext.Response.StatusCode = StatusCodes.Status404NotFound; 94_httpContext.Response.ContentType = null; 105if (_httpContext.Response.HasStarted) 108await using var writer = new HttpResponseStreamWriter(_httpContext.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared); 110HandleNavigationAfterResponseStarted(bufferWriter, _httpContext, uri); 115await HandleNavigationBeforeResponseStarted(_httpContext, uri);
Rendering\EndpointHtmlRenderer.Prerendering.cs (3)
40return new SSRRenderModeBoundary(_httpContext, componentType, renderMode); 122: new SSRRenderModeBoundary(_httpContext, componentType, prerenderMode); 157return await HandleNavigationException(_httpContext, navigationException);
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (6)
23var manager = _httpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>(); 44InteractiveServerRenderMode => new ProtectedPrerenderComponentApplicationStore(_httpContext.RequestServices.GetRequiredService<IDataProtectionProvider>()), 65var serverStore = new ProtectedPrerenderComponentApplicationStore(_httpContext.RequestServices.GetRequiredService<IDataProtectionProvider>()); 118switch (GetPersistStateRenderMode(_httpContext)) 136var manager = _httpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>(); 143var protectedStore = new ProtectedPrerenderComponentApplicationStore(_httpContext.RequestServices.GetRequiredService<IDataProtectionProvider>());
Rendering\EndpointHtmlRenderer.Streaming.cs (10)
90HandleExceptionAfterResponseStarted(_httpContext, writer, ex); 92await _httpContext.Response.CompleteAsync(); 154var isEnhancedNavigation = IsProgressivelyEnhancedNavigation(_httpContext.Request); 269var marker = boundary.ToMarker(_httpContext, sequenceAndKey.Sequence, sequenceAndKey.Key); 272if (!_httpContext.Response.HasStarted && marker.Type is ComponentMarker.ServerMarkerType or ComponentMarker.AutoMarkerType) 274_httpContext.Response.Headers.CacheControl = "no-cache, no-store, max-age=0"; 279if (_httpContext.RequestServices.GetRequiredService<WebAssemblySettingsEmitter>().TryGetSettingsOnce(out var settings)) 325var preloads = _httpContext.GetEndpoint()?.Metadata.GetMetadata<ResourcePreloadCollection>(); 328_httpContext.Response.Headers.Link = StringValues.Concat(_httpContext.Response.Headers.Link, linkHeaders);