Delen via


WebHostBuilderExtensions Class

Definition

Contains extensions for configuring an IWebHostBuilder.

public ref class WebHostBuilderExtensions abstract sealed
public static class WebHostBuilderExtensions
type WebHostBuilderExtensions = class
Public Module WebHostBuilderExtensions
Inheritance
WebHostBuilderExtensions

Methods

Configure(IWebHostBuilder, Action<IApplicationBuilder>)

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

Configure(IWebHostBuilder, Action<WebHostBuilderContext,IApplicationBuilder>)

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

ConfigureAppConfiguration(IWebHostBuilder, Action<IConfigurationBuilder>)

Adds a delegate for configuring the IConfigurationBuilder that will construct an IConfiguration.

ConfigureLogging(IWebHostBuilder, Action<ILoggingBuilder>)

Adds a delegate for configuring the provided ILoggingBuilder. This may be called multiple times.

ConfigureLogging(IWebHostBuilder, Action<WebHostBuilderContext,ILoggingBuilder>)

Adds a delegate for configuring the provided LoggerFactory. This may be called multiple times.

UseDefaultServiceProvider(IWebHostBuilder, Action<ServiceProviderOptions>)

Configures the default service provider

UseDefaultServiceProvider(IWebHostBuilder, Action<WebHostBuilderContext,ServiceProviderOptions>)

Configures the default service provider

UseStartup(IWebHostBuilder, Type)

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

UseStartup<TStartup>(IWebHostBuilder, Func<WebHostBuilderContext,TStartup>)

Specify a factory that creates the startup instance to be used by the web host.

UseStartup<TStartup>(IWebHostBuilder)

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

UseStaticWebAssets(IWebHostBuilder)

Configures the WebRootFileProvider to use static web assets defined by referenced projects and packages.

Applies to