WebHostExtensions.Run 方法

定义

重载

Run(IWebHost)

运行 Web 应用程序并阻止调用线程,直到主机关闭。

Run(IWebHost, CancellationToken)

运行 Web 应用程序并阻止调用线程,直到触发令牌或触发关闭。

Run(IWebHost)

Source:
WebHostExtensions.cs
Source:
WebHostExtensions.cs
Source:
WebHostExtensions.cs

运行 Web 应用程序并阻止调用线程,直到主机关闭。

public:
[System::Runtime::CompilerServices::Extension]
 static void Run(Microsoft::AspNetCore::Hosting::IWebHost ^ host);
public static void Run (this Microsoft.AspNetCore.Hosting.IWebHost host);
static member Run : Microsoft.AspNetCore.Hosting.IWebHost -> unit
<Extension()>
Public Sub Run (host As IWebHost)

参数

host
IWebHost

要运行的 IWebHost

适用于

Run(IWebHost, CancellationToken)

运行 Web 应用程序并阻止调用线程,直到触发令牌或触发关闭。

public:
[System::Runtime::CompilerServices::Extension]
 static void Run(Microsoft::AspNetCore::Hosting::IWebHost ^ host, System::Threading::CancellationToken token);
public static void Run (this Microsoft.AspNetCore.Hosting.IWebHost host, System.Threading.CancellationToken token);
static member Run : Microsoft.AspNetCore.Hosting.IWebHost * System.Threading.CancellationToken -> unit
<Extension()>
Public Sub Run (host As IWebHost, token As CancellationToken)

参数

host
IWebHost

要运行的 IWebHost

token
CancellationToken

用于触发关闭的令牌。

适用于