SystemdLifetime Klass

Definition

Tillhandahåller meddelanden för att starta och stoppa programmet och konfigurerar konsolloggning till systemformatet.

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
Arv
SystemdLifetime
Attribut
Implementeringar

Konstruktorer

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

Initierar en ny SystemdLifetime instans.

Metoder

Name Description
Dispose()

Utför programdefinierade uppgifter som är associerade med att frigöra, frigöra eller återställa ohanterade resurser.

StopAsync(CancellationToken)

Asynkront stoppar och stänger av värden. Den här metoden anropas från StopAsync(CancellationToken).

WaitForStartAsync(CancellationToken)

Väntar asynkront tills startåtgärden är klar innan den fortsätter. Den här metoden anropas i början av StartAsync(CancellationToken). Detta kan användas för att fördröja starten tills den signaleras av en extern händelse.

Gäller för