WebApplicationBuilder Class

Definition

A builder for web applications and services.

public sealed class WebApplicationBuilder
type WebApplicationBuilder = class
Public NotInheritable Class WebApplicationBuilder
Inheritance
WebApplicationBuilder

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.

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.

Applies to