Exemple #1
0
        public void RunPrimaryTastList(TaskList taskList, ProcessTaskHandler processTaskHandler)
        {
            isPrimary = true;
            //taskList.EndTaskWritte += processTaskHandler;
            foreach (ITask task in taskList.TasksList){
                task.EndTaskWrite +=processTaskHandler;
            }

            taskList.ExecuteTask();
            isPrimary = false;
        }
Exemple #2
0
        public void RunPrimaryTastList(TaskList taskList, ProcessTaskHandler processTaskHandler)
        {
            isPrimary = true;
            //taskList.EndTaskWritte += processTaskHandler;
            foreach (ITask task in taskList.TasksList)
            {
                task.EndTaskWrite += processTaskHandler;
            }


            taskList.ExecuteTask();
            isPrimary = false;
        }
Exemple #3
0
        public void RunSecondaryTastList(TaskList taskList, ProcessTaskHandler processTaskHandler,ProcessErrorHandler errorTaskHandler)
        {
            if (isBussy || isPrimary)
                return;

            foreach (ITask task in taskList.TasksList){
                //task.EndTaskWritte += processTaskHandler;
                task.ErrorWrite+=errorTaskHandler;
                task.EndTaskWrite +=processTaskHandler;
            }

            //secondTaskList = taskList;
            if(secondTaskList== null)
                secondTaskList = new TaskList();

            secondTaskList.TasksList.AddRange(taskList.TasksList);
        }
Exemple #4
0
        public void RunPrimaryTastListOnlineWrite(TaskList taskList, ProcessTaskHandler processTaskHandler,ProcessErrorHandler errorTaskHandler,ProcessErrorHandler logTaskHandler)
        {
            isPrimary = true;
            //taskList.EndTaskWritte += processTaskHandler;
            //taskList.ErrorTaskWritte+=errorTaskHandler;
            //if (logTaskHandler != null)
            //	taskList.LogTaskWritte+= logTaskHandler;

            foreach (ITask task in taskList.TasksList){
                task.ErrorWrite+=errorTaskHandler;
                task.EndTaskWrite +=processTaskHandler;
                if (logTaskHandler != null)
                    task.LogWrite+= logTaskHandler;
            }

            taskList.ExecuteTaskOnlineWrite();
            isPrimary = false;
        }
Exemple #5
0
        public void RunPrimaryTastListOnlineWrite(TaskList taskList, ProcessTaskHandler processTaskHandler, ProcessErrorHandler errorTaskHandler, ProcessErrorHandler logTaskHandler)
        {
            isPrimary = true;
            //taskList.EndTaskWritte += processTaskHandler;
            //taskList.ErrorTaskWritte+=errorTaskHandler;
            //if (logTaskHandler != null)
            //	taskList.LogTaskWritte+= logTaskHandler;

            foreach (ITask task in taskList.TasksList)
            {
                task.ErrorWrite   += errorTaskHandler;
                task.EndTaskWrite += processTaskHandler;
                if (logTaskHandler != null)
                {
                    task.LogWrite += logTaskHandler;
                }
            }


            taskList.ExecuteTaskOnlineWrite();
            isPrimary = false;
        }
Exemple #6
0
        public void RunSecondaryTastList(TaskList taskList, ProcessTaskHandler processTaskHandler, ProcessErrorHandler errorTaskHandler)
        {
            if (isBussy || isPrimary)
            {
                return;
            }

            foreach (ITask task in taskList.TasksList)
            {
                //task.EndTaskWritte += processTaskHandler;
                task.ErrorWrite   += errorTaskHandler;
                task.EndTaskWrite += processTaskHandler;
            }


            //secondTaskList = taskList;
            if (secondTaskList == null)
            {
                secondTaskList = new TaskList();
            }

            secondTaskList.TasksList.AddRange(taskList.TasksList);
        }
Exemple #7
0
 public ProcessTask <TTask, TNextTask> Process <TNextTask>(ProcessTaskHandler <TTask, TNextTask> task)
 {
     return(new ProcessTask <TTask, TNextTask>(task, this._queue));
 }
Exemple #8
0
 public ProcessTask <TNextTask, TPipeline> Process <TPipeline>(ProcessTaskHandler <TNextTask, TPipeline> task)
 {
     return(new ProcessTask <TNextTask, TPipeline>(task, this._queue));
 }
Exemple #9
0
 internal ProcessTask(ProcessTaskHandler <TTask, TNextTask> task, TaskQueue <IStatement> queue)
 {
     this.Task = task;
     queue.Enqueue(this);
     this._queue = queue;
 }
Exemple #10
0
    public void RunSecondaryTaskList(TaskList tasklist, ProcessTaskHandler processTaskHandler, bool clearError)
    {
        if(clearError){
            Gtk.Application.Invoke(delegate{

            this.ErrorOutput.Clear();
            });
        }

        MainClass.TaskServices.RunSecondaryTastList(tasklist, processTaskHandler, ErrorTaskWritte);
    }