Skip to main content

IDispatcher Interface

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Dispatches jobs to a thread.

public interface IDispatcher

Methods​

NameDescription
CheckAccessDetermines whether the calling thread is the thread associated with this Avalonia.Threading.IDispatcher.
PostPosts an action that will be invoked on the dispatcher thread.
VerifyAccessThrows an exception if the calling thread is not the thread associated with this Avalonia.Threading.IDispatcher.

CheckAccess Method​

Determines whether the calling thread is the thread associated with this Avalonia.Threading.IDispatcher.

public bool CheckAccess()

Returns​

bool

True if he calling thread is the thread associated with the dispatched, otherwise false.

Post Method​

Posts an action that will be invoked on the dispatcher thread.

public void Post(Action action, Avalonia.Threading.DispatcherPriority priority)

Parameters​

action Action

The method.

priority Avalonia.Threading.DispatcherPriority

The priority with which to invoke the method.

VerifyAccess Method​

Throws an exception if the calling thread is not the thread associated with this Avalonia.Threading.IDispatcher.

public void VerifyAccess()