예제 #1
0
 void WorkerDoWork(object sender, DoWorkEventArgs e)
 {
     var worker = sender as BackgroundWorker;
     var aionProcessKiller = new AionProcessKiller(Log, AionBuildProcess);
     for (var i = 0; i < BuildTimeOutInSeconds; i++)
     {
         if (worker.CancellationPending)
         {
             e.Cancel = true;
             break;
         }
         Thread.Sleep(1000);
     }
     if (!e.Cancel)
     {
         aionProcessKiller.Kill();
     }
 }
예제 #2
0
        void WorkerDoWork(object sender, DoWorkEventArgs e)
        {
            var worker            = sender as BackgroundWorker;
            var aionProcessKiller = new AionProcessKiller(Log, AionBuildProcess);

            for (var i = 0; i < BuildTimeOutInSeconds; i++)
            {
                if (worker.CancellationPending)
                {
                    e.Cancel = true;
                    break;
                }
                Thread.Sleep(1000);
            }
            if (!e.Cancel)
            {
                aionProcessKiller.Kill();
            }
        }