WebHost.Start 方法

定义

重载

Start(RequestDelegate)

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

Start(Action<IRouteBuilder>)

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

Start(String, RequestDelegate)

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

Start(String, Action<IRouteBuilder>)

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

Start(RequestDelegate)

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

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

public:
 static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(Microsoft::AspNetCore::Http::RequestDelegate ^ app);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (Microsoft.AspNetCore.Http.RequestDelegate app);
static member Start : Microsoft.AspNetCore.Http.RequestDelegate -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (app As RequestDelegate) As IWebHost

参数

app
RequestDelegate

处理对应用程序的请求的委托。

返回

承载应用程序的已启动 IWebHost

适用于

Start(Action<IRouteBuilder>)

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

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

public:
 static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(Action<Microsoft::AspNetCore::Routing::IRouteBuilder ^> ^ routeBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (Action<Microsoft.AspNetCore.Routing.IRouteBuilder> routeBuilder);
static member Start : Action<Microsoft.AspNetCore.Routing.IRouteBuilder> -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (routeBuilder As Action(Of IRouteBuilder)) As IWebHost

参数

routeBuilder
Action<IRouteBuilder>

一个委托,用于配置路由器以处理对应用程序的请求。

返回

承载应用程序的已启动 IWebHost

适用于

Start(String, RequestDelegate)

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

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

public:
 static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(System::String ^ url, Microsoft::AspNetCore::Http::RequestDelegate ^ app);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (string url, Microsoft.AspNetCore.Http.RequestDelegate app);
static member Start : string * Microsoft.AspNetCore.Http.RequestDelegate -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (url As String, app As RequestDelegate) As IWebHost

参数

url
String

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

app
RequestDelegate

处理对应用程序的请求的委托。

返回

承载应用程序的已启动 IWebHost

适用于

Start(String, Action<IRouteBuilder>)

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

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

public:
 static Microsoft::AspNetCore::Hosting::IWebHost ^ Start(System::String ^ url, Action<Microsoft::AspNetCore::Routing::IRouteBuilder ^> ^ routeBuilder);
public static Microsoft.AspNetCore.Hosting.IWebHost Start (string url, Action<Microsoft.AspNetCore.Routing.IRouteBuilder> routeBuilder);
static member Start : string * Action<Microsoft.AspNetCore.Routing.IRouteBuilder> -> Microsoft.AspNetCore.Hosting.IWebHost
Public Shared Function Start (url As String, routeBuilder As Action(Of IRouteBuilder)) As IWebHost

参数

url
String

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

routeBuilder
Action<IRouteBuilder>

一个委托,用于配置路由器以处理对应用程序的请求。

返回

承载应用程序的已启动 IWebHost

适用于