Číst v angličtině

Sdílet prostřednictvím


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.

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

Returns

The initialized HostApplicationBuilder.

Remarks

The following defaults are applied to the returned HostApplicationBuilder:

Applies to

.NET 10 (package-provided) a další verze
Produkt Verze
.NET 8 (package-provided), 9 (package-provided), 10 (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.

C#
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 10 (package-provided) a další verze
Produkt Verze
.NET 8 (package-provided), 9 (package-provided), 10 (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.

C#
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 10 (package-provided) a další verze
Produkt Verze
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)