Lire en anglais

Partager via


HostingAbstractionsHostExtensions.Run(IHost) Méthode

Définition

Exécute une application et bloque le thread appelant jusqu’à ce que l’arrêt de l’hôte soit déclenché et que toutes les IHostedService instances soient arrêtées.

C#
public static void Run (this Microsoft.Extensions.Hosting.IHost host);

Paramètres

host
IHost

IHost à exécuter.

S’applique à

Produit Versions
.NET 6, 7, 8, 9
.NET Framework 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1