共用方式為


GenericHostWebHostBuilderExtensions.ConfigureWebHost 方法

定義

多載

ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>)

新增和設定 ASP.NET Core Web 應用程式。

ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>, Action<WebHostBuilderOptions>)

新增和設定 ASP.NET Core Web 應用程式。

ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>)

來源:
GenericHostWebHostBuilderExtensions.cs

新增和設定 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

要新增 IWebHostBuilderIHostBuilder

configure
Action<IWebHostBuilder>

設定 IWebHostBuilder 的委派。

傳回

IHostBuilder

適用於

ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>, Action<WebHostBuilderOptions>)

來源:
GenericHostWebHostBuilderExtensions.cs

新增和設定 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

要新增 IWebHostBuilderIHostBuilder

configure
Action<IWebHostBuilder>

設定 IWebHostBuilder 的委派。

configureWebHostBuilder
Action<WebHostBuilderOptions>

設定 WebHostBuilderOptions 的委派。

傳回

IHostBuilder

適用於