SystemdLifetime Class

Definition

Provides notification messages for application started and stopping, and configures console logging to the systemd format.

[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
Inheritance
SystemdLifetime
Attributes
Implements

Constructors

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
StopAsync(CancellationToken)

Asynchronously stops and shuts down the host. This method is called from StopAsync(CancellationToken).

ToString()

Returns a string that represents the current object.

(Inherited from Object)
WaitForStartAsync(CancellationToken)

Asynchronously waits until the start operation is complete before continuing. This method is called at the beginning of StartAsync(CancellationToken). This can be used to delay startup until signaled by an external event.

Applies to

产品 版本
.NET 8 (package-provided), 9 (package-provided)
.NET Standard 2.1 (package-provided)