Dela via


WebApplicationBuilder Class

Definition

A builder for web applications and services.

public sealed class WebApplicationBuilder
public sealed class WebApplicationBuilder : Microsoft.Extensions.Hosting.IHostApplicationBuilder
type WebApplicationBuilder = class
type WebApplicationBuilder = class
    interface IHostApplicationBuilder
Public NotInheritable Class WebApplicationBuilder
Public NotInheritable Class WebApplicationBuilder
Implements IHostApplicationBuilder
Inheritance
WebApplicationBuilder
Implements

Properties

Configuration

A collection of configuration providers for the application to compose. This is useful for adding new configuration sources and providers.

Environment

Provides information about the web hosting environment an application is running.

Host

An IHostBuilder for configuring host specific properties, but not building. To build after configuration, call Build().

Logging

A collection of logging providers for the application to compose. This is useful for adding new logging providers.

Metrics

Allows enabling metrics and directing their output.

Services

A collection of services for the application to compose. This is useful for adding user provided or framework provided services.

WebHost

An IWebHostBuilder for configuring server specific properties, but not building. To build after configuration, call Build().

Methods

Build()

Builds the WebApplication.

Explicit Interface Implementations

IHostApplicationBuilder.Configuration
IHostApplicationBuilder.ConfigureContainer<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>, Action<TContainerBuilder>)
IHostApplicationBuilder.Environment
IHostApplicationBuilder.Properties

Applies to