SystemdLifetime Třída

Definice

Poskytuje zprávy oznámení pro spuštěné a zastavované aplikace a konfiguruje protokolování konzoly do systémového formátu.

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
Dědičnost
SystemdLifetime
Atributy
Implementuje

Konstruktory

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

Inicializuje novou SystemdLifetime instanci.

Metody

Name Description
Dispose()

Provádí úlohy definované aplikací související s uvolněním, uvolněním nebo resetováním nespravovaných prostředků.

StopAsync(CancellationToken)

Asynchronně zastaví a vypne hostitele. Tato metoda je volána z StopAsync(CancellationToken).

WaitForStartAsync(CancellationToken)

Asynchronně čeká, až se počáteční operace dokončí, než budete pokračovat. Tato metoda je volána na začátku StartAsync(CancellationToken). Tuto možnost lze použít ke zpoždění spuštění, dokud nebude signalizováno externí událostí.

Platí pro