HostingHostBuilderExtensions.ConfigureHostOptions 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ConfigureHostOptions(IHostBuilder, Action<HostBuilderContext,HostOptions>) |
加入委派以設定 HostOptions 的 IHost。 |
ConfigureHostOptions(IHostBuilder, Action<HostOptions>) |
加入委派,以設定HostOptionsIHost與相關的實例的 。 |
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>)
加入委派,以設定HostOptionsIHost與相關的實例的 。
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 執行個體。