public interface INavigationPresentation A presentation of a navigator's content, attached with RunicNavigator.AttachPresentation. Presentation integrations, such as the Runic Views runtime, implement it; applications do not.
Methods
Forget
void Forget(object content) Releases everything the presentation holds for retiring owned content. The navigator calls it once per retiring owned entry, outside model turns, after the entry's child regions are closed and before the content is disposed.
Parameters
contentThe retiring content.
Remarks
It should not throw; a failure is logged (event 1064, step Forget) and retirement continues. It must not await navigation of the same navigator.
ForgetAsync
ValueTask ForgetAsync(object content) Releases everything the presentation holds for retiring owned content, like INavigationPresentation.Forget, and returns a task that completes when work the presentation keeps for the content has ended, such as Runic Views operations declared with RunicOperationRetirement.Cancel or Drain. The navigator calls it instead of INavigationPresentation.Forget; the default implementation calls INavigationPresentation.Forget and completes at once.
Parameters
contentThe retiring content.
Returns
A task that completes when the content's work held by this presentation has ended.
Remarks
The navigator disposes the content, its entry scope and its model-context lease only after the task completes. It does not wait for the task to finish the retirement: a Back or another transition that retires the entry commits and completes, and RunicNavigator.IsBusy and RunicNavigator.WhenIdleAsync do not wait for it either. RunicNavigator.DisposeAsync waits for it up to RunicNavigatorOptions.CloseTimeout, then logs event 1077 and returns while the content is still disposed once the task completes.
The same rules as for INavigationPresentation.Forget apply: it should not throw, and a failure, whether thrown or reported by the task, is logged (event 1064, step Forget) and retirement continues.