WebHostBuilderKestrelExtensions.ConfigureKestrel 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ConfigureKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>) |
設定 Kestrel 選項,但不註冊 IServer。 請參閱 UseKestrel(IWebHostBuilder)。 |
ConfigureKestrel(IWebHostBuilder, Action<KestrelServerOptions>) |
設定 Kestrel 選項,但不註冊 IServer。 請參閱 UseKestrel(IWebHostBuilder)。 |
ConfigureKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>)
設定 Kestrel 選項,但不註冊 IServer。 請參閱 UseKestrel(IWebHostBuilder)。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::AspNetCore::Server::Kestrel::Core::KestrelServerOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureKestrel (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> configureOptions);
static member ConfigureKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureKestrel (hostBuilder As IWebHostBuilder, configureOptions As Action(Of WebHostBuilderContext, KestrelServerOptions)) As IWebHostBuilder
參數
- hostBuilder
- IWebHostBuilder
要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。
- configureOptions
- Action<WebHostBuilderContext,KestrelServerOptions>
設定 Kestrel 選項的回呼。
傳回
Microsoft.AspNetCore.Hosting.IWebHostBuilder。
適用於
ConfigureKestrel(IWebHostBuilder, Action<KestrelServerOptions>)
設定 Kestrel 選項,但不註冊 IServer。 請參閱 UseKestrel(IWebHostBuilder)。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ ConfigureKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Server::Kestrel::Core::KestrelServerOptions ^> ^ options);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder ConfigureKestrel (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> options);
static member ConfigureKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function ConfigureKestrel (hostBuilder As IWebHostBuilder, options As Action(Of KestrelServerOptions)) As IWebHostBuilder
參數
- hostBuilder
- IWebHostBuilder
要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。
- options
- Action<KestrelServerOptions>
設定 Kestrel 選項的回呼。
傳回
Microsoft.AspNetCore.Hosting.IWebHostBuilder。