private void startInner(Func <Task> schedulerAction) { using (new ScopedSynchronizationContext(m_synchContext)) { m_synchContext.OperationStarted(); var actionTask = schedulerAction(); actionTask.ContinueWith(_ => m_synchContext.OperationCompleted(), TaskScheduler.Default); m_scheduler.Run(); actionTask.WaitAndPropagateException(); } }
public void Run_When_Zero_Tasks_Added_Then_Returns_Zero() { var result = m_scheduler.Run(); Assert.AreEqual(0, result); }
public virtual void Run() => m_ioServiceScheduler.Run();