WebHostBuilderExtensions Class

Namespace
Microsoft.AspNetCore.Hosting
Assemblies
  • Microsoft.AspNetCore.Hosting

Syntax

public class WebHostBuilderExtensions
class Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions

Methods

Configure(Microsoft.AspNetCore.Hosting.IWebHostBuilder, System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder>)

Specify the startup method to be used to configure the web application.

Arguments:
Return type:

Microsoft.AspNetCore.Hosting.IWebHostBuilder

Returns:

The Microsoft.AspNetCore.Hosting.IWebHostBuilder.

public static IWebHostBuilder Configure(this IWebHostBuilder hostBuilder, Action<IApplicationBuilder> configureApp)
UseStartup(Microsoft.AspNetCore.Hosting.IWebHostBuilder, System.Type)

Specify the startup type to be used by the web host.

Arguments:
Return type:

Microsoft.AspNetCore.Hosting.IWebHostBuilder

Returns:

The Microsoft.AspNetCore.Hosting.IWebHostBuilder.

public static IWebHostBuilder UseStartup(this IWebHostBuilder hostBuilder, Type startupType)
UseStartup<TStartup>(Microsoft.AspNetCore.Hosting.IWebHostBuilder)

Specify the startup type to be used by the web host.

Arguments:hostBuilder (Microsoft.AspNetCore.Hosting.IWebHostBuilder) – The Microsoft.AspNetCore.Hosting.IWebHostBuilder to configure.
Return type:Microsoft.AspNetCore.Hosting.IWebHostBuilder
Returns:The Microsoft.AspNetCore.Hosting.IWebHostBuilder.
public static IWebHostBuilder UseStartup<TStartup>(this IWebHostBuilder hostBuilder)where TStartup : class