WebApplicationBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |