Compartilhar via


DispatcherExtensions Class

Definition

This class provides a set of extension methods that can be used on objects implementing IDispatcher.

public ref class DispatcherExtensions abstract sealed
public static class DispatcherExtensions
type DispatcherExtensions = class
Public Module DispatcherExtensions
Inheritance
DispatcherExtensions

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