WebHostBuilderExtensions.Configure 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Configure(IWebHostBuilder, Action<IApplicationBuilder>) |
指定要用來設定 Web 應用程式的啟動方法。 |
Configure(IWebHostBuilder, Action<WebHostBuilderContext,IApplicationBuilder>) |
指定要用來設定 Web 應用程式的啟動方法。 |
Configure(IWebHostBuilder, Action<IApplicationBuilder>)
指定要用來設定 Web 應用程式的啟動方法。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ Configure(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ configureApp);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder Configure (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> configureApp);
static member Configure : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function Configure (hostBuilder As IWebHostBuilder, configureApp As Action(Of IApplicationBuilder)) As IWebHostBuilder
參數
- hostBuilder
- IWebHostBuilder
要設定的 IWebHostBuilder。
- configureApp
- Action<IApplicationBuilder>
設定 IApplicationBuilder 的委派。
傳回
適用於
Configure(IWebHostBuilder, Action<WebHostBuilderContext,IApplicationBuilder>)
指定要用來設定 Web 應用程式的啟動方法。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ Configure(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Action<Microsoft::AspNetCore::Hosting::WebHostBuilderContext ^, Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ configureApp);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder Configure (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext,Microsoft.AspNetCore.Builder.IApplicationBuilder> configureApp);
static member Configure : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.Hosting.WebHostBuilderContext, Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function Configure (hostBuilder As IWebHostBuilder, configureApp As Action(Of WebHostBuilderContext, IApplicationBuilder)) As IWebHostBuilder
參數
- hostBuilder
- IWebHostBuilder
要設定的 IWebHostBuilder。
- configureApp
- Action<WebHostBuilderContext,IApplicationBuilder>
設定 IApplicationBuilder 的委派。