SystemdLifetime 类

定义

为应用程序启动和停止提供通知消息,并将控制台日志记录配置为系统化格式。

public ref 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")]
public class SystemdLifetime : IDisposable, Microsoft.Extensions.Hosting.IHostLifetime
type SystemdLifetime = class
    interface IHostLifetime
    interface IDisposable
[<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
Public Class SystemdLifetime
Implements IDisposable, IHostLifetime
继承
SystemdLifetime
属性
实现

构造函数

SystemdLifetime(IHostEnvironment, IHostApplicationLifetime, ISystemdNotifier, ILoggerFactory)

初始化一个新 SystemdLifetime 实例。

方法

Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
StopAsync(CancellationToken)

异步停止和关闭主机。 通过 StopAsync(CancellationToken) 调用此方法。

ToString()

返回表示当前对象的字符串。

(继承自 Object)
WaitForStartAsync(CancellationToken)

异步等待,直到启动操作完成,然后再继续。 在 StartAsync(CancellationToken) 开头调用此方法。 它可用于延迟启动,直到外部事件发出信号。

适用于