Dispatcher 类

定义

提供核心事件消息调度程序。 此类型的实例负责处理窗口消息并将事件调度到客户端。

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
继承
Dispatcher
实现

属性

IsDispatchRequired

获取一个值,该值指示此操作是否需要调度。

方法

CreateTimer()

创建与此调度程序关联的对象的新实例 IDispatcherTimer

Dispatch(Action)

从工作线程计划 UI 线程上提供的操作。

DispatchDelayed(TimeSpan, Action)

根据提供的延迟,从工作线程计划 UI 线程上提供的操作。

GetForCurrentThread()

提供核心事件消息调度程序。 此类型的实例负责处理窗口消息并将事件调度到客户端。

扩展方法

DispatchAsync(IDispatcher, Action)

从工作线程计划 UI 线程上提供的操作。

DispatchAsync(IDispatcher, Func<Task>)

从工作线程在 UI 线程上计划提供的函数。

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

从工作线程计划 UI 线程上提供的回调,并异步返回结果。

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

从工作线程在 UI 线程上计划提供的函数。

GetSynchronizationContextAsync(IDispatcher)

获取当前线程的同步上下文。

StartTimer(IDispatcher, TimeSpan, Func<Boolean>)

在指定的 IDispatcher 上下文上启动计时器。

适用于