Пример #1
0
 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();
     }
 }
Пример #2
0
        public void Run_When_Zero_Tasks_Added_Then_Returns_Zero()
        {
            var result = m_scheduler.Run();

            Assert.AreEqual(0, result);
        }
Пример #3
0
 public virtual void Run() => m_ioServiceScheduler.Run();