Share via


IApplicationLifetimeWrapper Interface

Definition

Custom service interface for signaling the extension when the function app is starting up or shutting down.

public interface IApplicationLifetimeWrapper
type IApplicationLifetimeWrapper = interface
Public Interface IApplicationLifetimeWrapper

Remarks

This interface is expected to be used as an injected service. We use a "wrapper" interface instead of directly using the "real" IApplicationLifetime interface so that we can have an injected service that is available in both .NET Core (Functions 2.0+) and .NET Framework (Functions 1.0).

Properties

OnStarted

Gets a CancellationToken that can be used to detect function app startup events.

OnStopped

Gets a CancellationToken that can be used to detect function app shutdown events.

OnStopping

Gets a CancellationToken that can be used to detect function app stopping events.

Applies to