public sealed class PresentationDispatcher : IUiDispatcher Dispatches once through a synchronous posting adapter, guarded by presentation shutdown.
Constructors
PresentationDispatcher
public PresentationDispatcher(PresentationLifetime lifetime, Func<bool> checkAccess, Action<Action> post) Dispatches once through a synchronous posting adapter, guarded by presentation shutdown.
Methods
CheckAccess
public bool CheckAccess() Whether the caller is on the UI thread.
Documentation from IUiDispatcher.CheckAccess.
InvokeAsync
public ValueTask InvokeAsync(Action action, CancellationToken cancellationToken = default) Runs an action once while the presentation remains valid.
Documentation from IUiDispatcher.InvokeAsync.