ApplicationLifetime class

Allows consumers to perform cleanup during a graceful shutdown.

Implemented types
Implementers

Constructors

ApplicationLifetime(Logger logger)

Properties

applicationStarted CancellationToken
Triggered when the application host has fully started and is about to wait for a graceful shutdown.
no setteroverride
applicationStopped CancellationToken
Triggered when the application host is performing a graceful shutdown. All requests should be complete at this point. Shutdown will block until this event completes.
no setteroverride
applicationStopping CancellationToken
Triggered when the application host is performing a graceful shutdown. Request may still be in flight. Shutdown will block until this event completes.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyStarted() → void
Signals the ApplicationStarted event and blocks until it completes.
notifyStopped() → void
Signals the ApplicationStopped event and blocks until it completes.
stopApplication() → void
Signals the ApplicationStopping event and blocks until it completes.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited