Table of Contents

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

next RequestDelegate

The next middleware to call.

requestMapper ISitecoreLayoutRequestMapper

The ISitecoreLayoutRequestMapper to map the HttpRequest to a Layout Service request.

layoutService ISitecoreLayoutClient

The layout service client.

options IOptions<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

httpContext HttpContext

The current HttpContext.

viewComponentHelper IViewComponentHelper

The current IViewComponentHelper.

htmlHelper IHtmlHelper

The current IHtmlHelper.

Returns

Task

A Task to support async calls.