HostingAbstractionsHostExtensions Classe

Definizione

Fornisce metodi di estensione per il pacchetto di astrazione dell'hosting IHost .

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

Metodi

Run(IHost)

Esegue un'applicazione e blocca il thread chiamante fino a quando non viene attivato l'arresto dell'host e tutte le IHostedService istanze vengono arrestate.

RunAsync(IHost, CancellationToken)

Esegue un'applicazione e restituisce un'attività che viene completata solo quando il token viene attivato o arrestato e tutte le IHostedService istanze vengono arrestate.

Start(IHost)

Avvia l'host in modo sincrono.

StopAsync(IHost, TimeSpan)

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

WaitForShutdown(IHost)

Blocca il thread chiamante fino a quando non viene attivato l'arresto tramite CTRL+C o SIGTERM.

WaitForShutdownAsync(IHost, CancellationToken)

Restituisce un'attività che viene completata quando viene attivato l'arresto tramite il token specificato.

Si applica a