語言

SystemdLifetime 建構函式

定義

初始化新的 SystemdLifetime 執行個體。

public:
 SystemdLifetime(Microsoft::Extensions::Hosting::IHostEnvironment ^ environment, Microsoft::Extensions::Hosting::IHostApplicationLifetime ^ applicationLifetime, Microsoft::Extensions::Hosting::Systemd::ISystemdNotifier ^ systemdNotifier, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public SystemdLifetime(Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Hosting.Systemd.ISystemdNotifier systemdNotifier, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.Extensions.Hosting.Systemd.SystemdLifetime : Microsoft.Extensions.Hosting.IHostEnvironment * Microsoft.Extensions.Hosting.IHostApplicationLifetime * Microsoft.Extensions.Hosting.Systemd.ISystemdNotifier * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.Extensions.Hosting.Systemd.SystemdLifetime
Public Sub New (environment As IHostEnvironment, applicationLifetime As IHostApplicationLifetime, systemdNotifier As ISystemdNotifier, loggerFactory As ILoggerFactory)

參數

environment
IHostEnvironment

關於主持人的資訊。

applicationLifetime
IHostApplicationLifetime

那 IHostApplicationLifetime 是追蹤服役壽命的。

systemdNotifier
ISystemdNotifier

然後 ISystemdNotifier 通知 Systemd 服務狀態。

loggerFactory
ILoggerFactory

它們 ILoggerFactory 用來實例化終身記錄器。

適用於