Path: redb-tsak/src/redb.Tsak.Core/Contracts/ITsakLifecycleHook.cs Snapshot: redb-tsak, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-tsak Page: https://redbase.app/src/dev-2026-12-06/redb-tsak/src/redb.Tsak.Core/Contracts/ITsakLifecycleHook.cs ---- namespace redb.Tsak.Core.Contracts; /// /// Generic lifecycle hook for Tsak startup/shutdown. /// Registered via DI, called by TsakHostedService in order. /// public interface ITsakLifecycleHook { /// Execution order: lower starts earlier and stops later (shutdown runs the hooks in reverse order). int Order => 0; /// Called during Tsak startup, before module discovery. Task OnStartingAsync(CancellationToken ct); /// Called during Tsak shutdown, before the contexts are stopped and drained. Task OnStoppingAsync(CancellationToken ct); }