---
title: "Class SitecoreLayoutRequestHandlerBuilder<THandler>"
slug: "sitecore.layoutservice.client.sitecorelayoutrequesthandlerbuilder-1"
abstract: ""
---
# Class SitecoreLayoutRequestHandlerBuilder<THandler>

Contract for configuring named Sitecore layout service request handlers.

## Inheritance

System.Object

SitecoreLayoutRequestHandlerBuilder<THandler>

### Implements

[ILayoutRequestHandlerBuilder](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.ilayoutrequesthandlerbuilder-1.html)<THandler>

#### **Namespace**: Sitecore.LayoutService.Client

##### **Assembly**: Sitecore.LayoutService.Client.dll

##### Syntax

```csharp
public class SitecoreLayoutRequestHandlerBuilder<THandler> : Object, ILayoutRequestHandlerBuilder<THandler> where THandler : ILayoutRequestHandler

```

##### Type Parameters

| Name | Description |
| --- | --- |
| THandler | The type of handler being configured. |

### Constructors

#### SitecoreLayoutRequestHandlerBuilder(String, IServiceCollection)

Initializes a new instance of the [SitecoreLayoutRequestHandlerBuilder<THandler>](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.sitecorelayoutrequesthandlerbuilder-1.html) class.

##### Declaration

```csharp
public SitecoreLayoutRequestHandlerBuilder(string handlerName, IServiceCollection services)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | handlerName | The name of the handler being configured. |
| Microsoft.Extensions.DependencyInjection.IServiceCollection | services | The initial Microsoft.Extensions.DependencyInjection.IServiceCollection. |

### Properties

#### HandlerName

Gets the name of the handler being configured.

##### Declaration

```csharp
public string HandlerName { get; }

```

##### Property Value

| Type | Description |
| --- | --- |
| System.String |  |

#### Services

Gets the Microsoft.Extensions.DependencyInjection.IServiceCollection where Sitecore layout services are configured.

##### Declaration

```csharp
public IServiceCollection Services { get; }

```

##### Property Value

| Type | Description |
| --- | --- |
| Microsoft.Extensions.DependencyInjection.IServiceCollection |  |

### Implements

[ILayoutRequestHandlerBuilder<THandler>](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.ilayoutrequesthandlerbuilder-1.html)
