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 : ObjectMethods
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 : ILayoutRequestHandlerParameters
| Type | Name | Description |
|---|---|---|
| ILayoutRequestHandlerBuilder<THandler> | builder |
The builder being configured. |
Returns
| Type | Description |
|---|---|
| ILayoutRequestHandlerBuilder<THandler> |
The configured ILayoutRequestHandlerBuilder<THandler>. |
Type Parameters
| Name | Description |
|---|---|
| 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 : ILayoutRequestHandlerParameters
| Type | Name | Description |
|---|---|---|
| ILayoutRequestHandlerBuilder<THandler> | builder |
The ILayoutRequestHandlerBuilder<THandler> being configured. |
| System.Action<SitecoreLayoutRequest> | configureRequest |
The SitecoreLayoutRequest request options configuration. |
Returns
| Type | Description |
|---|---|
| ILayoutRequestHandlerBuilder<THandler> |
The configured ILayoutRequestHandlerBuilder<THandler>. |
Type Parameters
| Name | Description |
|---|---|
| THandler |
The type of handler being configured. |