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

Methods

AsDefaultHandler<THandler>(ILayoutRequestHandlerBuilder<THandler>)

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

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

The builder being configured.

Returns
TypeDescription
ILayoutRequestHandlerBuilder<THandler>

The configured ILayoutRequestHandlerBuilder<THandler>.

Type Parameters
NameDescription
THandler

The type of handler being configured.

WithRequestOptions<THandler>(ILayoutRequestHandlerBuilder<THandler>, Action<SitecoreLayoutRequest>)

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

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

The ILayoutRequestHandlerBuilder<THandler> being configured.

System.Action<SitecoreLayoutRequest>configureRequest

The SitecoreLayoutRequest request options configuration.

Returns
TypeDescription
ILayoutRequestHandlerBuilder<THandler>

The configured ILayoutRequestHandlerBuilder<THandler>.

Type Parameters
NameDescription
THandler

The type of handler being configured.

Do you have some feedback for us?

If you have suggestions for improving this article,