Share via


WebHostExtensions Classe

Definizione

Contiene estensioni per la gestione del ciclo di vita di un IWebHostoggetto .

public ref class WebHostExtensions abstract sealed
public static class WebHostExtensions
type WebHostExtensions = class
Public Module WebHostExtensions
Ereditarietà
WebHostExtensions

Metodi

Run(IWebHost)

Esegue un'applicazione Web e blocca il thread chiamante fino all'arresto dell'host.

Run(IWebHost, CancellationToken)

Esegue un'applicazione Web e blocca il thread chiamante finché non viene attivato o arrestato il token.

RunAsync(IWebHost, CancellationToken)

Esegue un'applicazione Web e restituisce un'attività che viene completata solo quando il token viene attivato o arrestato.

StopAsync(IWebHost, TimeSpan)

Tenta di arrestare normalmente l'host con il timeout specificato.

WaitForShutdown(IWebHost)

Blocca il thread chiamante finché non viene attivato l'arresto tramite CTRL+C o SIGTERM.

WaitForShutdownAsync(IWebHost, CancellationToken)

Restituisce un'attività che viene completata quando l'arresto viene attivato tramite il token specificato, CTRL+C o SIGTERM.

Si applica a