WebHost.StartWith 方法

定义

重载

StartWith(Action<IApplicationBuilder>)

使用预配置的默认值初始化和启动新的 IWebHost 。 有关详细信息,请参阅CreateDefaultBuilder()

StartWith(String, Action<IApplicationBuilder>)

使用预配置的默认值初始化和启动新的 IWebHost 。 有关详细信息,请参阅CreateDefaultBuilder()

StartWith(Action<IApplicationBuilder>)

Source:
WebHost.cs
Source:
WebHost.cs
Source:
WebHost.cs

使用预配置的默认值初始化和启动新的 IWebHost 。 有关详细信息,请参阅CreateDefaultBuilder()

public:
 static Microsoft::AspNetCore::Hosting::IWebHost ^ StartWith(Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ app);
public static Microsoft.AspNetCore.Hosting.IWebHost StartWith (Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> app);
static member StartWith : Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function StartWith (app As Action(Of IApplicationBuilder)) As IWebHost

参数

app
Action<IApplicationBuilder>

用于配置 IApplicationBuilder 的委托。

返回

承载应用程序的启动 IWebHost

适用于

StartWith(String, Action<IApplicationBuilder>)

Source:
WebHost.cs
Source:
WebHost.cs
Source:
WebHost.cs

使用预配置的默认值初始化和启动新的 IWebHost 。 有关详细信息,请参阅CreateDefaultBuilder()

public:
 static Microsoft::AspNetCore::Hosting::IWebHost ^ StartWith(System::String ^ url, Action<Microsoft::AspNetCore::Builder::IApplicationBuilder ^> ^ app);
public static Microsoft.AspNetCore.Hosting.IWebHost StartWith (string url, Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> app);
static member StartWith : string * Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function StartWith (url As String, app As Action(Of IApplicationBuilder)) As IWebHost

参数

url
String

托管应用程序将侦听的 URL。

app
Action<IApplicationBuilder>

用于配置 IApplicationBuilder 的委托。

返回

承载应用程序的启动 IWebHost

适用于