IDispatcher Interface

Summary

Dispatches jobs to a thread.
Namespace
Avalonia.Threading
Implementing Types
graph BT Type["IDispatcher"] class Type type-node Implementing0["Dispatcher"]-.->Type click Implementing0 "/api/Avalonia.Threading/Dispatcher"

Syntax

public interface IDispatcher

Methods

Name Value Summary
CheckAccess() bool
Determines whether the calling thread is the thread associated with this IDispatcher.
InvokeAsync(Action, DispatcherPriority) Task
Posts an action that will be invoked on the dispatcher thread.
InvokeAsync(Func<Task>, DispatcherPriority) Task
Queues the specified work to run on the dispatcher thread and returns a proxy for the task returned by function.
InvokeAsync<TResult>(Func<Task<TResult>>, DispatcherPriority) Task<TResult>
Queues the specified work to run on the dispatcher thread and returns a proxy for the task returned by function.
InvokeAsync<TResult>(Func<TResult>, DispatcherPriority) Task<TResult>
Posts a function that will be invoked on the dispatcher thread.
Post(Action, DispatcherPriority) void
Invokes a method on the dispatcher thread.
VerifyAccess() void
Throws an exception if the calling thread is not the thread associated with this IDispatcher.