예제 #1
0
파일: Dispatcher.cs 프로젝트: vebin/Perspex
 /// <summary>
 /// Post action that will be invoked on main thread
 /// </summary>
 /// <param name="action">The method.</param>
 /// <param name="priority">The priority with which to invoke the method.</param>
 public void InvokeAsync(Action action, DispatcherPriority priority = DispatcherPriority.Normal)
 {
     _jobRunner?.Post(action, priority);
 }
예제 #2
0
 public IDisposable StartTimer(TimeSpan interval, Action tick)
 => PerspexLocator.Current.GetService <IPclPlatformWrapper>().StartSystemTimer(interval,
                                                                               () => _timerJobRunner.Post(tick, DispatcherPriority.Normal));