Class RenderingEngineMiddleware
- Namespace
- Sitecore.AspNetCore.SDK.RenderingEngine.Middleware
- Assembly
- Sitecore.AspNetCore.SDK.RenderingEngine.dll
The Rendering Engine middleware implementation that calls the Sitecore layout service and stores the ISitecoreRenderingContext as a HttpContext feature.
public class RenderingEngineMiddleware
- Inheritance
-
RenderingEngineMiddleware
- Inherited Members
Remarks
Initializes a new instance of the RenderingEngineMiddleware class.
Constructors
RenderingEngineMiddleware(RequestDelegate, ISitecoreLayoutRequestMapper, ISitecoreLayoutClient, IOptions<RenderingEngineOptions>)
The Rendering Engine middleware implementation that calls the Sitecore layout service and stores the ISitecoreRenderingContext as a HttpContext feature.
public RenderingEngineMiddleware(RequestDelegate next, ISitecoreLayoutRequestMapper requestMapper, ISitecoreLayoutClient layoutService, IOptions<RenderingEngineOptions> options)
Parameters
nextRequestDelegateThe next middleware to call.
requestMapperISitecoreLayoutRequestMapperThe ISitecoreLayoutRequestMapper to map the HttpRequest to a Layout Service request.
layoutServiceISitecoreLayoutClientThe layout service client.
optionsIOptions<RenderingEngineOptions>Rendering Engine options.
Remarks
Initializes a new instance of the RenderingEngineMiddleware class.
Methods
Invoke(HttpContext, IViewComponentHelper, IHtmlHelper)
The middleware Invoke method.
public Task Invoke(HttpContext httpContext, IViewComponentHelper viewComponentHelper, IHtmlHelper htmlHelper)
Parameters
httpContextHttpContextThe current HttpContext.
viewComponentHelperIViewComponentHelperThe current IViewComponentHelper.
htmlHelperIHtmlHelperThe current IHtmlHelper.