/// <summary> /// Schedules the provided handler using the idle priority /// </summary> /// <param name="handler">The handler to execute</param> /// <returns>An async operation for the scheduled handler.</returns> public UIAsyncOperation RunIdleAsync(IdleDispatchedHandler handler) { return(EnqueueOperation( CoreDispatcherPriority.Idle, () => handler(_idleDispatchedHandlerArgs) )); }
/// <summary> /// Begin <paramref name="agileCallback"/> on UI thread with idle priority. /// </summary> /// <param name="dispatcher"><see cref="CoreDispatcher"/> to run <paramref name="agileCallback"/> on</param> /// <param name="agileCallback">callback to execute</param> /// <exception cref="ArgumentNullException"><paramref name="dispatcher"/> or <paramref name="agileCallback"/> /// is <see langword="null"/></exception> public static void BeginIdle(this CoreDispatcher dispatcher, IdleDispatchedHandler agileCallback) { if (dispatcher == null) { throw new ArgumentNullException(nameof(dispatcher)); } beginIdleCore(dispatcher, agileCallback); }
private static async void beginIdleCore(CoreDispatcher dispatcher, IdleDispatchedHandler agileCallback) { await dispatcher.RunIdleAsync(agileCallback); }
public void Schedule(IdleDispatchedHandler action) => throw new NotImplementedException();