public sealed class RunicTestNavigationEntry<TContent> : IAsyncDisposable where TContent : class One navigation entry of a test navigator, created by RunicTestNavigationEntry.CreateAsync, with the transitions that change its state. Dispose it to close the navigator, which retires the entry.
Type parameters
TContentThe content's type.
Properties
Completion
public Task<NavigationCompletion<object?>> Completion { get; } Gets the completion of the request that pushed the entry: Completed with the value of NavigationEntryContext.CompleteAsync, or Dismissed when the entry leaves otherwise.
Content
public TContent Content { get; } Gets the content, constructed with RunicTestNavigationEntry.Context.
Context
public NavigationEntryContext Context { get; } Gets the context the content was constructed with.
Navigator
public RunicNavigator Navigator { get; } Gets the navigator, whose model context is a RunicModelContext owned by this object.
Region
public NavigationRegion<object> Region { get; } Gets the region that holds the entry. It has no other entries unless RunicTestNavigationEntry.RetainAsync pushed one.
Methods
ActivateAsync
public Task<NavigationResult<object>> ActivateAsync(CancellationToken cancellationToken = default) Goes back to this entry, which makes a retained entry current again.
Parameters
cancellationTokenCancels the transition.
Returns
The transition's result, which is rejected when the entry is not retained.
DisposeAsync
public ValueTask DisposeAsync() Closes the navigator, which retires the entry without asking its guards, then its model context.
RetainAsync
public Task<NavigationResult<object>> RetainAsync(CancellationToken cancellationToken = default) Pushes another entry over this one, which retains it.
Parameters
cancellationTokenCancels the push.
Returns
The push's result.
RetireAsync
public Task<NavigationResult<object>> RetireAsync(CancellationToken cancellationToken = default) Clears the region, which retires the entry after its departure guards agree.
Parameters
cancellationTokenCancels the transition.
Returns
The clear's result.