WebHostBuilderExtensions.Configure 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Configure(IWebHostBuilder, Action<IApplicationBuilder>) |
指定要用于配置 Web 应用程序的启动方法。 |
Configure(IWebHostBuilder, Action<WebHostBuilderContext,IApplicationBuilder>) |
指定要用于配置 Web 应用程序的启动方法。 |
Configure(IWebHostBuilder, Action<IApplicationBuilder>)
- Source:
- WebHostBuilderExtensions.cs
- Source:
- WebHostBuilderExtensions.cs
- Source:
- WebHostBuilderExtensions.cs
指定要用于配置 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>)
- Source:
- WebHostBuilderExtensions.cs
指定要用于配置 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 的委托。