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 的委派。