HostingHostBuilderExtensions.ConfigureHostOptions 方法

定义

重载

ConfigureHostOptions(IHostBuilder, Action<HostBuilderContext,HostOptions>)

添加一个委托,用于配置 HostOptionsIHost

ConfigureHostOptions(IHostBuilder, Action<HostOptions>)

添加一个委托,用于配置 HostOptions 与 相关的 实例的 IHost

ConfigureHostOptions(IHostBuilder, Action<HostBuilderContext,HostOptions>)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

添加一个委托,用于配置 HostOptionsIHost

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureHostOptions(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::Hosting::HostOptions ^> ^ configureOptions);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureHostOptions (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.Hosting.HostOptions> configureOptions);
static member ConfigureHostOptions : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.Hosting.HostOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureHostOptions (hostBuilder As IHostBuilder, configureOptions As Action(Of HostBuilderContext, HostOptions)) As IHostBuilder

参数

hostBuilder
IHostBuilder

要配置的 IHostBuilder

configureOptions
Action<HostBuilderContext,HostOptions>

用于配置 HostOptions 的委托。

返回

用于链接的相同 IHostBuilder 实例。

适用于

ConfigureHostOptions(IHostBuilder, Action<HostOptions>)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

添加一个委托,用于配置 HostOptions 与 相关的 实例的 IHost

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureHostOptions(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Hosting::HostOptions ^> ^ configureOptions);
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureHostOptions (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.HostOptions> configureOptions);
static member ConfigureHostOptions : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.HostOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureHostOptions (hostBuilder As IHostBuilder, configureOptions As Action(Of HostOptions)) As IHostBuilder

参数

hostBuilder
IHostBuilder

要配置的 IHostBuilder

configureOptions
Action<HostOptions>

用于配置 HostOptions 的委托。

返回

用于链接的相同 IHostBuilder 实例。

适用于