WebHostBuilderKestrelExtensions.UseKestrel 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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)
将 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>)
将 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>)
将 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。