Skip to main content

Definition

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

Syntax

Microsoft.Extensions.Hosting.IHostBuilder

Summary

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

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

Configure Extension

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

public static Microsoft.Extensions.Hosting.IHostBuilder Configure(Microsoft.Extensions.Hosting.IHostBuilder builder, System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configure)

Parameters

NameTypeDescription
builderMicrosoft.Extensions.Hosting.IHostBuilderThe IHostBuilder to configure.
configureSystem.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>The delegate to configure the IApplicationBuilder.

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder for chaining.

GetAllServiceDescriptors Extension

Extension method from Microsoft.Extensions.DependencyInjection.Breakdance_Assemblies_IHostBuilderExtensions
Get all registered ServiceDescriptorServiceDescriptors</see> for a given container.

Syntax

public static System.Collections.Generic.Dictionary<System.Type, Microsoft.Extensions.DependencyInjection.ServiceDescriptor> GetAllServiceDescriptors(Microsoft.Extensions.Hosting.IHostBuilder builder)

Parameters

NameTypeDescription
builderMicrosoft.Extensions.Hosting.IHostBuilder-

Returns

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

Remarks

Taken from https://stackoverflow.com/a/60529530/403765

GetContainerContentsLog Extension

Extension method from Microsoft.Extensions.DependencyInjection.Breakdance_Assemblies_IHostBuilderExtensions

Syntax

public static string GetContainerContentsLog(Microsoft.Extensions.Hosting.IHostBuilder hostBuilder)

Parameters

NameTypeDescription
hostBuilderMicrosoft.Extensions.Hosting.IHostBuilder-

Returns

Type: string

UseStartup Extension

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

public static Microsoft.Extensions.Hosting.IHostBuilder UseStartup<TStartup>(Microsoft.Extensions.Hosting.IHostBuilder builder) where TStartup : class

Parameters

NameTypeDescription
builderMicrosoft.Extensions.Hosting.IHostBuilderThe IHostBuilder to configure.

Returns

Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder for chaining.

Type Parameters

  • TStartup - The startup type.