GenericHostWebHostBuilderExtensions.ConfigureWebHost 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>) |
添加和配置 ASP.NET Core Web 应用程序。 |
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>, Action<WebHostBuilderOptions>) |
添加和配置 ASP.NET Core Web 应用程序。 |
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>)
添加和配置 ASP.NET Core Web 应用程序。
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureWebHost (this Microsoft.Extensions.Hosting.IHostBuilder builder, Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> configure);
static member ConfigureWebHost : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureWebHost (builder As IHostBuilder, configure As Action(Of IWebHostBuilder)) As IHostBuilder
参数
- builder
- IHostBuilder
要向其中添加 IWebHostBuilder 的 IHostBuilder。
- configure
- Action<IWebHostBuilder>
用于配置 IWebHostBuilder 的委托。
返回
适用于
ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>, Action<WebHostBuilderOptions>)
添加和配置 ASP.NET Core Web 应用程序。
public static Microsoft.Extensions.Hosting.IHostBuilder ConfigureWebHost (this Microsoft.Extensions.Hosting.IHostBuilder builder, Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> configure, Action<Microsoft.Extensions.Hosting.WebHostBuilderOptions> configureWebHostBuilder);
static member ConfigureWebHost : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.AspNetCore.Hosting.IWebHostBuilder> * Action<Microsoft.Extensions.Hosting.WebHostBuilderOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function ConfigureWebHost (builder As IHostBuilder, configure As Action(Of IWebHostBuilder), configureWebHostBuilder As Action(Of WebHostBuilderOptions)) As IHostBuilder
参数
- builder
- IHostBuilder
要向其中添加 IWebHostBuilder 的 IHostBuilder。
- configure
- Action<IWebHostBuilder>
用于配置 IWebHostBuilder 的委托。
- configureWebHostBuilder
- Action<WebHostBuilderOptions>
用于配置 WebHostBuilderOptions 的委托。