/// <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); }
public IDisposable StartTimer(TimeSpan interval, Action tick) => PerspexLocator.Current.GetService <IPclPlatformWrapper>().StartSystemTimer(interval, () => _timerJobRunner.Post(tick, DispatcherPriority.Normal));