Interface INavigationRestoreStore
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Navigation.dll
Persists the navigation-state snapshot. The default store is a JSON file in the app cache directory; replace in DI for custom locations or formats.
public interface INavigationRestoreStore
Methods
ReadAndDelete()
Reads the persisted snapshot and DELETES it in the same operation (crash-loop containment: a replay that crashes the app yields a clean next boot). Called once during startup — must be synchronous and fast. Returns null when no snapshot exists (or reading fails — restore is fail-open).
string? ReadAndDelete()
Returns
WriteAsync(string, CancellationToken)
Persists a snapshot, replacing any previous one. Called debounced in the background; exceptions are swallowed by the caller (capture must never affect navigation).
Task WriteAsync(string snapshot, CancellationToken cancellationToken)
Parameters
snapshotstringcancellationTokenCancellationToken