public interface INavigationDepartureGuard Can veto a transition that retains or retires an entry.
Methods
CanDepartAsync
ValueTask<bool> CanDepartAsync(NavigationDeparture departure, CancellationToken cancellationToken) Returns whether the entry may depart. Runs outside model turns. A guard may run again for the same entry: a parent transition that retires an entry's child regions asks the child's guards even when a transition of the child already asked them, so a guard must be repeatable.
Parameters
departureThe departing entry, whether it is retained or retired, and the operation.
cancellationTokenCancelled when the transition is superseded, cancelled or closed.