Share via


WebHostExtensions.Run Method

Definition

Overloads

Run(IWebHost)

Runs a web application and block the calling thread until host shutdown.

Run(IWebHost, CancellationToken)

Runs a web application and block the calling thread until token is triggered or shutdown is triggered.

Run(IWebHost)

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

Runs a web application and block the calling thread until host shutdown.

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)

Parameters

host
IWebHost

The IWebHost to run.

Applies to

Run(IWebHost, CancellationToken)

Runs a web application and block the calling thread until token is triggered or shutdown is triggered.

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)

Parameters

host
IWebHost

The IWebHost to run.

token
CancellationToken

The token to trigger shutdown.

Applies to