IHostedService Interface
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Définit des méthodes pour les objets gérés par l’hôte.
public interface class IHostedService
public interface IHostedService
type IHostedService = interface
Public Interface IHostedService
- Dérivé
Méthodes
| Nom | Description |
|---|---|
| StartAsync(CancellationToken) |
Déclenché lorsque l’hôte de l’application est prêt à démarrer le service. |
| StopAsync(CancellationToken) |
Déclenché lorsque l’hôte de l’application effectue un arrêt approprié. |
Méthodes d’extension
| Nom | Description |
|---|---|
| StartAndStopAsync(IHostedService, CancellationToken) |
Démarre et arrête immédiatement le service. |