Host.CreateApplicationBuilder Method

Definition

Overloads

CreateApplicationBuilder()

Initializes a new instance of the HostApplicationBuilder class with pre-configured defaults.

CreateApplicationBuilder(HostApplicationBuilderSettings)

Initializes a new instance of the HostApplicationBuilder class with preconfigured defaults.

CreateApplicationBuilder(String[])

Initializes a new instance of the HostApplicationBuilder class with pre-configured defaults.

CreateApplicationBuilder()

Source:
Host.cs
Source:
Host.cs
Source:
Host.cs

Initializes a new instance of the HostApplicationBuilder class with pre-configured defaults.

public static Microsoft.Extensions.Hosting.HostApplicationBuilder CreateApplicationBuilder ();

Returns

The initialized HostApplicationBuilder.

Remarks

The following defaults are applied to the returned HostApplicationBuilder:

Applies to

.NET 9 (package-provided) e outras versões
Produto Versões
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

CreateApplicationBuilder(HostApplicationBuilderSettings)

Source:
Host.cs
Source:
Host.cs
Source:
Host.cs

Initializes a new instance of the HostApplicationBuilder class with preconfigured defaults.

public static Microsoft.Extensions.Hosting.HostApplicationBuilder CreateApplicationBuilder (Microsoft.Extensions.Hosting.HostApplicationBuilderSettings? settings);

Parameters

settings
HostApplicationBuilderSettings

Controls the initial configuration and other settings for constructing the HostApplicationBuilder.

Returns

A new HostApplicationBuilder instance.

Applies to

.NET 9 (package-provided) e outras versões
Produto Versões
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

CreateApplicationBuilder(String[])

Source:
Host.cs
Source:
Host.cs
Source:
Host.cs

Initializes a new instance of the HostApplicationBuilder class with pre-configured defaults.

public static Microsoft.Extensions.Hosting.HostApplicationBuilder CreateApplicationBuilder (string[]? args);

Parameters

args
String[]

The command line args.

Returns

The initialized HostApplicationBuilder.

Remarks

The following defaults are applied to the returned HostApplicationBuilder:

Applies to

.NET 9 (package-provided) e outras versões
Produto Versões
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)