SystemdLifetime Constructor

Definition

Initializes a new SystemdLifetime instance.

C#
public SystemdLifetime(Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Hosting.Systemd.ISystemdNotifier systemdNotifier, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);

Parameters

environment
IHostEnvironment

Information about the host.

applicationLifetime
IHostApplicationLifetime

The IHostApplicationLifetime that tracks the service lifetime.

systemdNotifier
ISystemdNotifier

The ISystemdNotifier to notify Systemd about service status.

loggerFactory
ILoggerFactory

The ILoggerFactory used to instantiate the lifetime logger.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.1 (package-provided)