Taal

IHostedLifecycleService Interface

Definitie

Definieert methoden die worden uitgevoerd vóór of na StartAsync(CancellationToken) en StopAsync(CancellationToken).

public interface class IHostedLifecycleService : Microsoft::Extensions::Hosting::IHostedService
public interface IHostedLifecycleService : Microsoft.Extensions.Hosting.IHostedService
type IHostedLifecycleService = interface
    interface IHostedService
Public Interface IHostedLifecycleService
Implements IHostedService
Implementeringen

Methoden

Name Description
StartAsync(CancellationToken)

Geactiveerd wanneer de toepassingshost gereed is om de service te starten.

(Overgenomen van IHostedService)
StartedAsync(CancellationToken)

Geactiveerd na StartAsync(CancellationToken).

StartingAsync(CancellationToken)

Geactiveerd vóór StartAsync(CancellationToken).

StopAsync(CancellationToken)

Geactiveerd wanneer de toepassingshost een probleemloos afsluiten uitvoert.

(Overgenomen van IHostedService)
StoppedAsync(CancellationToken)

Geactiveerd na StopAsync(CancellationToken).

StoppingAsync(CancellationToken)

Geactiveerd vóór StopAsync(CancellationToken).

Extensiemethoden

Name Description
StartAndStopAsync(IHostedService, CancellationToken)

De service wordt gestart en onmiddellijk gestopt.

Van toepassing op