Condividi tramite


IDispatcher Interface

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 interface class IDispatcher
public interface IDispatcher
type IDispatcher = interface
Public Interface IDispatcher
Derived

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.

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