WebHostBuilderKestrelExtensions.ConfigureKestrel 方法

定义

重载

ConfigureKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>)

配置 Kestrel 选项,但不注册 IServer。 请参阅 UseKestrel(IWebHostBuilder)

ConfigureKestrel(IWebHostBuilder, Action<KestrelServerOptions>)

配置 Kestrel 选项,但不注册 IServer。 请参阅 UseKestrel(IWebHostBuilder)

ConfigureKestrel(IWebHostBuilder, Action<WebHostBuilderContext,KestrelServerOptions>)

Source:
WebHostBuilderKestrelExtensions.cs
Source:
WebHostBuilderKestrelExtensions.cs

配置 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>)

Source:
WebHostBuilderKestrelExtensions.cs
Source:
WebHostBuilderKestrelExtensions.cs

配置 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。

适用于