Class ServiceCollectionExtensions
Extension methods for setting up Sitecore Rendering Engine related services in an Microsoft.Extensions.DependencyInjection.IServiceCollection.
Inheritance
Namespace: Sitecore.AspNet.RenderingEngine.Extensions
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
public static class ServiceCollectionExtensions : ObjectMethods
AddSitecoreRenderingEngine(IServiceCollection, Action<RenderingEngineOptions>)
Adds the Sitecore Rendering Engine services to the Microsoft.Extensions.DependencyInjection.IServiceCollection.
Declaration
public static ISitecoreRenderingEngineBuilder AddSitecoreRenderingEngine(this IServiceCollection services, Action<RenderingEngineOptions> options = null)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<ForwardHeadersOptions>)
Enables forwarding of headers.
Declaration
public static ISitecoreRenderingEngineBuilder ForwardHeaders(this ISitecoreRenderingEngineBuilder serviceBuilder, Action<ForwardHeadersOptions> options = null)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. |