Class RenderingEngineMiddleware
Version: 21.x
The Rendering Engine middleware implementation that calls the Sitecore layout service and stores the ISitecoreRenderingContext as a Microsoft.AspNetCore.Http.HttpContext feature.
Inheritance
System.Object
RenderingEngineMiddleware
Namespace: Sitecore.AspNet.RenderingEngine.Middleware
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Constructors
RenderingEngineMiddleware(RequestDelegate, ISitecoreLayoutRequestMapper, ISitecoreLayoutClient, IOptions)
Initializes a new instance of the RenderingEngineMiddleware class.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.RequestDelegate | next | The next middleware to call. |
| ISitecoreLayoutRequestMapper | requestMapper | The ISitecoreLayoutRequestMapper to map the HttpRequest to a Layout Service request. |
| ISitecoreLayoutClient | layoutService | The layout service client. |
| Microsoft.Extensions.Options.IOptions < RenderingEngineOptions > | options | Rendering Engine options. |
Methods
Invoke(HttpContext, IViewComponentHelper, IHtmlHelper)
The middleware Invoke method.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.HttpContext | httpContext | The current Microsoft.AspNetCore.Http.HttpContext. |
| Microsoft.AspNetCore.Mvc.IViewComponentHelper | viewComponentHelper | The current Microsoft.AspNetCore.Mvc.IViewComponentHelper. |
| Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper | htmlHelper | The current Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A System.Threading.Tasks.Task to support async calls. |
If you have suggestions for improving this article, let us know!