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
public static class ServiceCollectionExtensions : Object

Methods

AddSitecoreRenderingEngine(IServiceCollection, Action)

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
TypeNameDescription
Microsoft.Extensions.DependencyInjection.IServiceCollectionservicesThe Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.
System.Action

<

RenderingEngineOptions

>
optionsConfigures the Rendering Engine options.
Returns
TypeDescription
ISitecoreRenderingEngineBuilderThe Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.

ForwardHeaders(ISitecoreRenderingEngineBuilder, Action)

Enables forwarding of headers.

Declaration
public static ISitecoreRenderingEngineBuilder ForwardHeaders(this ISitecoreRenderingEngineBuilder serviceBuilder, Action<ForwardHeadersOptions> options = null)
Parameters
TypeNameDescription
ISitecoreRenderingEngineBuilderserviceBuilderThe ISitecoreRenderingEngineBuilder to add services to.
System.Action

<

ForwardHeadersOptions

>
optionsConfigures the headers forwarding options.
Returns
TypeDescription
ISitecoreRenderingEngineBuilderThe Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.
If you have suggestions for improving this article, let us know!