# TestClusterBuilder Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterbuilder/)

## AddClientBuilderConfigurator {#addclientbuilderconfigurator-1-b0df02d3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterbuilder/methods/addclientbuilderconfigurator-1-b0df02d3/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterBuilder.cs#L130-L136)

```csharp
public TestClusterBuilder AddClientBuilderConfigurator<T>()
```

Adds an implementation of [IClientBuilderConfigurator](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.iclientbuilderconfigurator/) or [IHostConfigurator](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.ihostconfigurator/) to configure the client created for the test cluster

### Returns

The builder.

## AddSiloBuilderConfigurator {#addsilobuilderconfigurator-1-3c058571}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterbuilder/methods/addsilobuilderconfigurator-1-3c058571/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterBuilder.cs#L114-L120)

```csharp
public TestClusterBuilder AddSiloBuilderConfigurator<T>()
```

Adds an implementation of [ISiloConfigurator](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.isiloconfigurator/) or [IHostConfigurator](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.ihostconfigurator/) to configure silos created by the test cluster.

### Returns

The builder.

## Build {#build-a68fb80a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterbuilder/methods/build-a68fb80a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterBuilder.cs#L145-L171)

```csharp
public TestCluster Build()
```

Builds this instance.

### Returns

TestCluster.

## ConfigureBuilder(Action) {#configurebuilder-system-action-efbb51eb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterbuilder/methods/configurebuilder-system-action-efbb51eb/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterBuilder.cs#L90-L91)

```csharp
public TestClusterBuilder ConfigureBuilder(Action configureDelegate)
```

Adds a configuration delegate to the builder

### Parameters

- `configureDelegate` (`Action`): The configuration delegate.

## ConfigureHostConfiguration(Action&lt;IConfigurationBuilder&gt;) {#configurehostconfiguration-system-action-microsoft-extensions-configuration-icon-85a97d34}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterbuilder/methods/configurehostconfiguration-system-action-microsoft-extensions-configuration-icon-85a97d34/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterBuilder.cs#L103-L104)

```csharp
public TestClusterBuilder ConfigureHostConfiguration(Action<IConfigurationBuilder> configureDelegate)
```

Set up the configuration for the builder itself. This will be used as a base to initialize each silo host for use later in the build process. This can be called multiple times and the results will be additive.

### Parameters

- `configureDelegate` (`Action<IConfigurationBuilder>`): The delegate for configuring the `Microsoft.Extensions.Configuration.IConfigurationBuilder` that will be used to construct the `Microsoft.Extensions.Configuration.IConfiguration` for the host.

### Returns

The same instance of the host builder for chaining.

## CreateClusterId {#createclusterid-2be173ee}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterbuilder/methods/createclusterid-2be173ee/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterBuilder.cs#L180-L184)

```csharp
public static string CreateClusterId()
```

Creates a cluster identifier.

### Returns

A new cluster identifier.
