HostingHostBuilderExtensions.ConfigureHostOptions 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ConfigureHostOptions(IHostBuilder, Action<HostBuilderContext,HostOptions>) |
添加一个委托,用于配置 HostOptions 的 IHost。 |
ConfigureHostOptions(IHostBuilder, Action<HostOptions>) |
添加一个委托,用于配置 HostOptions 与 相关的 实例的 IHost 。 |
ConfigureHostOptions(IHostBuilder, Action<HostBuilderContext,HostOptions>)
添加一个委托,用于配置 HostOptions 的 IHost。
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>)
添加一个委托,用于配置 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 实例。