# TestClusterExtensions Methods

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

## GetConfiguration(IHostBuilder) {#getconfiguration-this-microsoft-extensions-hosting-ihostbuilder-f94c0267}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterextensions/methods/getconfiguration-this-microsoft-extensions-hosting-ihostbuilder-f94c0267/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterExtensions.cs#L22-L28)

```csharp
public static IConfiguration GetConfiguration(this IHostBuilder builder)
```

Gets the configuration from the specified host builder.

### Parameters

- `builder` (`IHostBuilder`): The builder.

## GetConfigurationValue(IHostBuilder, string) {#getconfigurationvalue-this-microsoft-extensions-hosting-ihostbuilder-string-acc55d5c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterextensions/methods/getconfigurationvalue-this-microsoft-extensions-hosting-ihostbuilder-string-acc55d5c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterExtensions.cs#L39)

```csharp
public static string GetConfigurationValue(this IHostBuilder hostBuilder, string key)
```

Gets a configuration value.

### Parameters

- `hostBuilder` (`IHostBuilder`): The host builder.
- `key` (`string`): The key.

### Returns

The configuration value.

## GetTestClusterOptions(IConfiguration) {#gettestclusteroptions-this-microsoft-extensions-configuration-iconfiguration-dbf9de92}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterextensions/methods/gettestclusteroptions-this-microsoft-extensions-configuration-iconfiguration-dbf9de92/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterExtensions.cs#L59-L61)

```csharp
public static TestClusterOptions GetTestClusterOptions(this IConfiguration config)
```

Gets the test cluster options.

### Parameters

- `config` (`IConfiguration`): The configuration.

### Returns

The test cluster options.

## GetTestClusterOptions(IHostBuilder) {#gettestclusteroptions-this-microsoft-extensions-hosting-ihostbuilder-5a982bc0}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.testclusterextensions/methods/gettestclusteroptions-this-microsoft-extensions-hosting-ihostbuilder-5a982bc0/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestClusterExtensions.cs#L49)

```csharp
public static TestClusterOptions GetTestClusterOptions(this IHostBuilder hostBuilder)
```

Gets the test cluster options.

### Parameters

- `hostBuilder` (`IHostBuilder`): The host builder.

### Returns

The test cluster options.
