Class SitecoreLayoutRequestHandlerBuilderExtensions

Version: 21.x

Extension methods to support configuration of Sitecore layout request handler services.

Inheritance

System.Object

SitecoreLayoutRequestHandlerBuilderExtensions

Namespace: Sitecore.LayoutService.Client.Extensions

Assembly: Sitecore.LayoutService.Client.dll

Syntax
public static class SitecoreLayoutRequestHandlerBuilderExtensions : Object

Methods

AsDefaultHandler(ILayoutRequestHandlerBuilder)

Sets the current handler being built as the default handler for Sitecore layout service client requests.

Declaration
public static ILayoutRequestHandlerBuilder<THandler> AsDefaultHandler<THandler>(this ILayoutRequestHandlerBuilder<THandler> builder)
    where THandler : ILayoutRequestHandler
Parameters
TypeNameDescription
ILayoutRequestHandlerBuilder

builderThe builder being configured.
Returns
TypeDescription
ILayoutRequestHandlerBuilder

The configured ILayoutRequestHandlerBuilder.
Type Parameters
NameDescription
THandlerThe type of handler being configured.

WithRequestOptions(ILayoutRequestHandlerBuilder, Action)

Registers the default Sitecore layout service request options for the given handler.

Declaration
public static ILayoutRequestHandlerBuilder<THandler> WithRequestOptions<THandler>(this ILayoutRequestHandlerBuilder<THandler> builder, Action<SitecoreLayoutRequest> configureRequest)
    where THandler : ILayoutRequestHandler
Parameters
TypeNameDescription
ILayoutRequestHandlerBuilder

builderThe ILayoutRequestHandlerBuilder being configured.
System.Action

<

SitecoreLayoutRequest

>
configureRequestThe SitecoreLayoutRequest request options configuration.
Returns
TypeDescription
ILayoutRequestHandlerBuilder

The configured ILayoutRequestHandlerBuilder.
Type Parameters
NameDescription
THandlerThe type of handler being configured.
If you have suggestions for improving this article, let us know!