Пример #1
0
 private void BeginCreatingAppPoolOnCheckedServer(List <BaseAction> actions)
 {
     // Initialize thread
     if (threadProcessor == null)
     {
         threadProcessor                  = new ThreadProcessor();
         threadProcessor.Completed       += new EventHandler <CompletedEventArgs>(threadProcessor_Completed);
         threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_Executing);
         threadProcessor.ActionExecuted  += new EventHandler <ActionExecutedEventArgs>(threadProcessor_Executed);
     }
     ActionFactory.UpdateActions(actions, GetCreateAppPoolActionParameters());
     threadProcessor.AsyncRunAllWorkUnits(actions);
 }
Пример #2
0
 private void BeginResourceGacCheck(List <BaseAction> actions)
 {
     // Initialize thread
     if (threadProcessor == null)
     {
         threadProcessor                  = new ThreadProcessor();
         threadProcessor.Completed       += new EventHandler <CompletedEventArgs>(threadProcessor_Completed);
         threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_Executing);
         threadProcessor.ActionExecuted  += new EventHandler <ActionExecutedEventArgs>(threadProcessor_Executed);
     }
     threadProcessor.AsyncRunAllWorkUnits(actions);
 }
Пример #3
0
        private void BeginActionOnServiceStartupType(List <BaseAction> actions)
        {
            this.FormState = FormStateEnum.Processing;

            // Initialize thread
            if (threadProcessor == null)
            {
                threadProcessor                  = new ThreadProcessor();
                threadProcessor.Completed       += new EventHandler <CompletedEventArgs>(threadProcessor_Completed);
                threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_ExecutingStartupType);
                threadProcessor.ActionExecuted  += new EventHandler <ActionExecutedEventArgs>(threadProcessor_ExecutedStartupType);
            }
            threadProcessor.AsyncRunAllWorkUnits(actions);
        }
Пример #4
0
 private void BeginTerminating(List <BaseAction> actions)
 {
     isInterrupted  = false;
     this.FormState = FormStateEnum.Processing;
     if (threadProcessor == null)
     {
         threadProcessor                  = new ThreadProcessor();
         threadProcessor.Completed       += new EventHandler <CompletedEventArgs>(threadProcessor_TerminateCompleted);
         threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_TerminateActionExecuting);
         threadProcessor.ActionExecuted  += new EventHandler <ActionExecutedEventArgs>(threadProcessor_TerminateActionExecuted);
     }
     //threadProcessor.AsyncRunControlledWorkUnits(actions, Environment.ProcessorCount);
     threadProcessor.AsyncRunAllWorkUnits(actions);
 }
Пример #5
0
        private void BeginExecuteActions(List <BaseAction> actions)
        {
            // Change form state
            this.FormState = FormStateEnum.Processing;

            // Initialize thread
            if (threadProcessor == null)
            {
                threadProcessor                  = new ThreadProcessor();
                threadProcessor.Completed       += new EventHandler <CompletedEventArgs>(threadProcessor_Completed);
                threadProcessor.ActionExecuting += new EventHandler <ActionExecutingEventArgs>(threadProcessor_ActionExecuting);
                threadProcessor.ActionExecuted  += new EventHandler <ActionExecutedEventArgs>(threadProcessor_ActionExecuted);
            }
            //threadProcessor.AsyncRun(actions);
            threadProcessor.AsyncRunAllWorkUnits(actions);
        }