WebHostExtensions Class¶
- Namespace
Microsoft.AspNetCore.Hosting
- Assemblies
- Microsoft.AspNetCore.Hosting
Methods¶
-
Run
(Microsoft.AspNetCore.Hosting.IWebHost)¶ Runs a web application and block the calling thread until host shutdown.
Arguments: host (Microsoft.AspNetCore.Hosting.IWebHost) – The Microsoft.AspNetCore.Hosting.IWebHost
to run.public static void Run(this IWebHost host)
-
Run
(Microsoft.AspNetCore.Hosting.IWebHost, System.Threading.CancellationToken) Runs a web application and block the calling thread until token is triggered or shutdown is triggered.
Arguments: - host (Microsoft.AspNetCore.Hosting.IWebHost) – The
Microsoft.AspNetCore.Hosting.IWebHost
to run. - token (System.Threading.CancellationToken) – The token to trigger shutdown.
public static void Run(this IWebHost host, CancellationToken token)
- host (Microsoft.AspNetCore.Hosting.IWebHost) – The
-