PresentationDispatcher class

Namespace Runic.Platform.Runtime · Runic.Platform.Runtime 0.7.0-preview.5

public sealed class PresentationDispatcher : IUiDispatcher

Inherits or implements 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.