SystemdLifetime Klasse

Definition

Stellt Benachrichtigungen für das Starten und Beenden der Anwendung bereit und konfiguriert die Konsolenprotokollierung im systemierten Format.

public ref class SystemdLifetime : IDisposable, Microsoft::Extensions::Hosting::IHostLifetime
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public class SystemdLifetime : IDisposable, Microsoft.Extensions.Hosting.IHostLifetime
public class SystemdLifetime : IDisposable, Microsoft.Extensions.Hosting.IHostLifetime
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
type SystemdLifetime = class
    interface IHostLifetime
    interface IDisposable
type SystemdLifetime = class
    interface IHostLifetime
    interface IDisposable
Public Class SystemdLifetime
Implements IDisposable, IHostLifetime
Vererbung
SystemdLifetime
Attribute
Implementiert

Konstruktoren

Name Beschreibung
SystemdLifetime(IHostEnvironment, IHostApplicationLifetime, ISystemdNotifier, ILoggerFactory)

Initialisiert eine neue Instanz von SystemdLifetime.

Methoden

Name Beschreibung
Dispose()

Führt anwendungsdefinierte Aufgaben aus, die mit dem Freigeben, Freigeben oder Zurücksetzen nicht verwalteter Ressourcen verknüpft sind.

StopAsync(CancellationToken)

Beendet und beendet den Host asynchron. Diese Methode wird von StopAsync(CancellationToken).

WaitForStartAsync(CancellationToken)

Wartet asynchron, bis der Startvorgang abgeschlossen ist, bevor der Vorgang fortgesetzt wird. Diese Methode wird am Anfang von StartAsync(CancellationToken). Dies kann verwendet werden, um den Start zu verzögern, bis dieser durch ein externes Ereignis initiiert wird.

Gilt für: