Interface IModalLifecycle
- Namespace
- ItTiger.TigerCli.Tui.Abstractions
- Assembly
- ItTiger.TigerCli.dll
Implemented by a dialog that needs to know the bounds of its modal session — when the semi-interactive
modal loop begins and ends hosting it. The shell calls OnModalOpened(CancellationToken) once before the
first render, supplying a token cancelled when the modal closes for any reason, and
OnModalClosed() exactly once on exit (key result, timeout, external cancellation, or
exception). Used to give controls a cancellation token for background work and a safe teardown point.
public interface IModalLifecycle
Methods
OnModalClosed()
Called exactly once as the modal loop ends, on every exit path.
void OnModalClosed()
OnModalOpened(CancellationToken)
Called once as the modal loop starts;
modalToken is cancelled when the modal closes.void OnModalOpened(CancellationToken modalToken)
Parameters
modalTokenCancellationToken