> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# IHostBuilder

> Extension methods for IHostBuilder from Microsoft.Extensions.Hosting.Abstractions

## Definition

**Assembly:** Microsoft.Extensions.Hosting.Abstractions.dll

**Namespace:** Microsoft.Extensions.Hosting

## Syntax

```csharp theme={"dark"}
Microsoft.Extensions.Hosting.IHostBuilder
```

## Summary

This type is defined in Microsoft.Extensions.Hosting.Abstractions.

## Remarks

See [Microsoft documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.ihostbuilder) for more information about the rest of the API.

## Methods

### &#x20;Configure Extension

> [!NOTE]
>
> Extension method from `Microsoft.Extensions.Hosting.BreakdanceHostBuilderExtensions`

Configures the application request pipeline for the web host.
This is a convenience wrapper around ConfigureWebHost for Breakdance test scenarios.

#### Syntax

```csharp theme={"dark"}
public static Microsoft.Extensions.Hosting.IHostBuilder Configure(Microsoft.Extensions.Hosting.IHostBuilder builder, System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configure)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `builder` | `Microsoft.Extensions.Hosting.IHostBuilder` | The [IHostBuilder](https://easyaf.nimbleapps.cloud/breakdance/api-reference/Microsoft/Extensions/Hosting/IHostBuilder.md) to configure. |
| `configure` | `System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>` | The delegate to configure the [IApplicationBuilder](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.builder.iapplicationbuilder). |

#### Returns

Type: `Microsoft.Extensions.Hosting.IHostBuilder`
The [IHostBuilder](https://easyaf.nimbleapps.cloud/breakdance/api-reference/Microsoft/Extensions/Hosting/IHostBuilder.md) for chaining.

### &#x20;GetAllServiceDescriptors Extension

> [!NOTE]
>
> Extension method from `Microsoft.Extensions.DependencyInjection.Breakdance_Assemblies_IHostBuilderExtensions`

Get all registered [ServiceDescriptor](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencyinjection.servicedescriptor)ServiceDescriptors\</see> for a given container.

#### Syntax

```csharp theme={"dark"}
public static System.Collections.Generic.Dictionary<System.Type, Microsoft.Extensions.DependencyInjection.ServiceDescriptor> GetAllServiceDescriptors(Microsoft.Extensions.Hosting.IHostBuilder builder)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `builder` | `Microsoft.Extensions.Hosting.IHostBuilder` | - |

#### Returns

Type: `System.Collections.Generic.Dictionary<System.Type, Microsoft.Extensions.DependencyInjection.ServiceDescriptor>`

#### Remarks

Taken from [https://stackoverflow.com/a/60529530/403765](https://stackoverflow.com/a/60529530/403765)

### &#x20;GetContainerContentsLog Extension

> [!NOTE]
>
> Extension method from `Microsoft.Extensions.DependencyInjection.Breakdance_Assemblies_IHostBuilderExtensions`

#### Syntax

```csharp theme={"dark"}
public static string GetContainerContentsLog(Microsoft.Extensions.Hosting.IHostBuilder hostBuilder)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `hostBuilder` | `Microsoft.Extensions.Hosting.IHostBuilder` | - |

#### Returns

Type: `string`

### &#x20;UseStartup Extension

> [!NOTE]
>
> Extension method from `Microsoft.Extensions.Hosting.BreakdanceHostBuilderExtensions`

Specifies the startup type to be used by the web host.
This is a convenience wrapper around ConfigureWebHost for Breakdance test scenarios.

#### Syntax

```csharp theme={"dark"}
public static Microsoft.Extensions.Hosting.IHostBuilder UseStartup<TStartup>(Microsoft.Extensions.Hosting.IHostBuilder builder) where TStartup : class
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `builder` | `Microsoft.Extensions.Hosting.IHostBuilder` | The [IHostBuilder](https://easyaf.nimbleapps.cloud/breakdance/api-reference/Microsoft/Extensions/Hosting/IHostBuilder.md) to configure. |

#### Returns

Type: `Microsoft.Extensions.Hosting.IHostBuilder`
The [IHostBuilder](https://easyaf.nimbleapps.cloud/breakdance/api-reference/Microsoft/Extensions/Hosting/IHostBuilder.md) for chaining.

#### Type Parameters

* `TStartup` - The startup type.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.