Table of Contents

Class NavigationTransition

Namespace
MackySoft.Navigathena
Assembly
MackySoft.Navigathena.dll

Describes how an operation obtains its whole-transition effect.

public sealed class NavigationTransition
Inheritance
NavigationTransition
Inherited Members

Remarks

The runtime checks cancellation before invoking the effect factory and before using its result. The factory forwards the token to ongoing work without duplicating the entry check. Registered resources and a returned effect are cleaned up even after cancellation.

Constructors

NavigationTransition(NavigationTransitionScope, Func<NavigationTransitionPreparationContext, CancellationToken, ValueTask<INavigationTransitionEffect>>, bool, TransitionEndTiming)

Defines an operation-owned effect and when it must settle relative to retired screen resources.

public NavigationTransition(NavigationTransitionScope scope, Func<NavigationTransitionPreparationContext, CancellationToken, ValueTask<INavigationTransitionEffect>> createEffectAsync, bool requiresSimultaneousScreens = false, TransitionEndTiming endTiming = TransitionEndTiming.AfterPresentation)

Parameters

scope NavigationTransitionScope

The region or host whose presentation and input the effect covers.

createEffectAsync Func<NavigationTransitionPreparationContext, CancellationToken, ValueTask<INavigationTransitionEffect>>

Creates or borrows the effect and registers its dependencies with the supplied lifetime. With AfterResourceRelease, their external owners must outlive settlement and must not end from a retiring screen's cleanup.

requiresSimultaneousScreens bool

Requires outgoing and incoming screen instances to coexist during the effect.

endTiming TransitionEndTiming

AfterResourceRelease keeps the effect alive and subscribed to progress until retired screen cleanup completes. Activation always follows settlement.

Properties

EndTiming

Determines whether the effect settles before or after retired screen resources finish releasing. Activation always follows settlement.

public TransitionEndTiming EndTiming { get; }

Property Value

TransitionEndTiming

None

public static NavigationTransition None { get; }

Property Value

NavigationTransition

RequiresSimultaneousScreens

public bool RequiresSimultaneousScreens { get; }

Property Value

bool

Scope

public NavigationTransitionScope Scope { get; }

Property Value

NavigationTransitionScope

Methods

Create<TState>(NavigationTransitionScope, ProgressDefinition<TState>, Func<NavigationTransitionPreparationContext, ProgressSource<TState>, CancellationToken, ValueTask<INavigationTransitionEffect>>, bool, TransitionEndTiming)

Connects an operation-local typed state before constructing the loading effect or acquiring destination screens.

public static NavigationTransition Create<TState>(NavigationTransitionScope scope, ProgressDefinition<TState> progress, Func<NavigationTransitionPreparationContext, ProgressSource<TState>, CancellationToken, ValueTask<INavigationTransitionEffect>> prepare, bool requiresSimultaneousScreens = false, TransitionEndTiming endTiming = TransitionEndTiming.AfterPresentation)

Parameters

scope NavigationTransitionScope

The region or host covered by the effect.

progress ProgressDefinition<TState>

The application's immutable state definition. Each execution receives a fresh state.

prepare Func<NavigationTransitionPreparationContext, ProgressSource<TState>, CancellationToken, ValueTask<INavigationTransitionEffect>>

Acquires or borrows the display and binds the supplied source with ObserveProgress. It does not perform destination initialization.

requiresSimultaneousScreens bool

Whether outgoing and incoming screen instances must coexist.

endTiming TransitionEndTiming

Whether settlement also waits for retired screen resources to be released.

Returns

NavigationTransition

Type Parameters

TState

FromDestinationScreen(NavigationTransitionScope, TransitionEndTiming)

Uses the prepared destination's effect. It cannot observe acquisition or initialization preceding its creation and settles before releasing its owner on rollback.

public static NavigationTransition FromDestinationScreen(NavigationTransitionScope scope, TransitionEndTiming endTiming = TransitionEndTiming.AfterPresentation)

Parameters

scope NavigationTransitionScope
endTiming TransitionEndTiming

Returns

NavigationTransition

FromSourceScreen(NavigationTransitionScope, TransitionEndTiming)

Uses the source screen's effect. AfterResourceRelease requires that screen to remain alive; a transition retiring its owner is rejected before activity stops.

public static NavigationTransition FromSourceScreen(NavigationTransitionScope scope, TransitionEndTiming endTiming = TransitionEndTiming.AfterPresentation)

Parameters

scope NavigationTransitionScope
endTiming TransitionEndTiming

Returns

NavigationTransition