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); }
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); }
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); }
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); }
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); }