Share via


Dispatcher Class

Definition

Provides the core event message dispatcher. Instances of this type are responsible for processing the window messages and dispatching the events to the client.

public ref class Dispatcher : Microsoft::Maui::Dispatching::IDispatcher
public class Dispatcher : Microsoft.Maui.Dispatching.IDispatcher
type Dispatcher = class
    interface IDispatcher
Public Class Dispatcher
Implements IDispatcher
Inheritance
Dispatcher
Implements

Properties

IsDispatchRequired

Gets a value that indicates whether dispatching is required for this action.

Methods

CreateTimer()

Creates a new instance of an IDispatcherTimer object associated with this dispatcher.

Dispatch(Action)

Schedules the provided action on the UI thread from a worker thread.

DispatchDelayed(TimeSpan, Action)

Schedules the provided action on the UI thread from a worker thread, taking into account the provided delay.

GetForCurrentThread()

Extension Methods

DispatchAsync(IDispatcher, Action)

Schedules the provided action on the UI thread from a worker thread.

DispatchAsync(IDispatcher, Func<Task>)

Schedules the provided function on the UI thread from a worker thread.

DispatchAsync<T>(IDispatcher, Func<T>)

Schedules the provided callback on the UI thread from a worker thread, and returns the results asynchronously.

DispatchAsync<T>(IDispatcher, Func<Task<T>>)

Schedules the provided function on the UI thread from a worker thread.

GetSynchronizationContextAsync(IDispatcher)

Gets the synchronization context for the current thread.

StartTimer(IDispatcher, TimeSpan, Func<Boolean>)

Starts a timer on the specified IDispatcher context.

Applies to