共用方式為


WebHostBuilderKestrelExtensions.UseKestrel 方法

定義

多載

UseKestrel(IWebHostBuilder)

將 Kestrel 指定為 Web 主機要使用的伺服器。

UseKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>)

將 Kestrel 指定為 Web 主機要使用的伺服器。

UseKestrel(IWebHostBuilder, Action<KestrelServerOptions>)

將 Kestrel 指定為 Web 主機要使用的伺服器。

UseKestrel(IWebHostBuilder, Action<KestrelServerOptions>)

將 Kestrel 指定為 Web 主機要使用的伺服器。

UseKestrel(IWebHostBuilder)

來源:
WebHostBuilderKestrelExtensions.cs
來源:
WebHostBuilderKestrelExtensions.cs
來源:
WebHostBuilderKestrelExtensions.cs

將 Kestrel 指定為 Web 主機要使用的伺服器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrel (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder);
static member UseKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseKestrel (hostBuilder As IWebHostBuilder) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。

傳回

Microsoft.AspNetCore.Hosting.IWebHostBuilder。

適用於

UseKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>)

來源:
WebHostBuilderKestrelExtensions.cs
來源:
WebHostBuilderKestrelExtensions.cs
來源:
WebHostBuilderKestrelExtensions.cs

將 Kestrel 指定為 Web 主機要使用的伺服器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::AspNetCore::Server::Kestrel::Core::KestrelServerOptions ^> ^ configureOptions);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrel (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> configureOptions);
static member UseKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseKestrel (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。

適用於

UseKestrel(IWebHostBuilder, Action<KestrelServerOptions>)

來源:
WebHostBuilderKestrelExtensions.cs
來源:
WebHostBuilderKestrelExtensions.cs
來源:
WebHostBuilderKestrelExtensions.cs

將 Kestrel 指定為 Web 主機要使用的伺服器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Server::Kestrel::Core::KestrelServerOptions ^> ^ options);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrel (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> options);
static member UseKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseKestrel (hostBuilder As IWebHostBuilder, options As Action(Of KestrelServerOptions)) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。

options
Action<KestrelServerOptions>

設定 Kestrel 選項的回呼。

傳回

Microsoft.AspNetCore.Hosting.IWebHostBuilder。

適用於

UseKestrel(IWebHostBuilder, Action<KestrelServerOptions>)

將 Kestrel 指定為 Web 主機要使用的伺服器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseKestrel(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Server::Kestrel::KestrelServerOptions ^> ^ options);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrel (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions> options);
static member UseKestrel : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Server.Kestrel.KestrelServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseKestrel (hostBuilder As IWebHostBuilder, options As Action(Of KestrelServerOptions)) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。

options
Action<KestrelServerOptions>

設定 Kestrel 選項的回呼。

傳回

Microsoft.AspNetCore.Hosting.IWebHostBuilder。

適用於