Class ServiceCollectionExtensions
Version: 21.x
Extension methods for setting up Sitecore Rendering Engine related services in an Microsoft.Extensions.DependencyInjection.IServiceCollection.
Inheritance
System.Object
ServiceCollectionExtensions
Namespace: Sitecore.AspNet.RenderingEngine.Extensions
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Methods
AddSitecoreRenderingEngine(IServiceCollection, Action)
Adds the Sitecore Rendering Engine services to the Microsoft.Extensions.DependencyInjection.IServiceCollection.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Extensions.DependencyInjection.IServiceCollection | services | The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to. |
| System.Action < RenderingEngineOptions > | options | Configures the Rendering Engine options. |
Returns
| Type | Description |
|---|---|
| ISitecoreRenderingEngineBuilder | The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained. |
ForwardHeaders(ISitecoreRenderingEngineBuilder, Action)
Enables forwarding of headers.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| ISitecoreRenderingEngineBuilder | serviceBuilder | The ISitecoreRenderingEngineBuilder to add services to. |
| System.Action < ForwardHeadersOptions > | options | Configures the headers forwarding options. |
Returns
| Type | Description |
|---|---|
| ISitecoreRenderingEngineBuilder | The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained. |
If you have suggestions for improving this article, let us know!