Пример #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;
        }
Пример #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;
        }
Пример #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);
        }
Пример #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;
        }
Пример #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;
        }
Пример #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);
        }
Пример #7
0
 public ProcessTask <TTask, TNextTask> Process <TNextTask>(ProcessTaskHandler <TTask, TNextTask> task)
 {
     return(new ProcessTask <TTask, TNextTask>(task, this._queue));
 }
Пример #8
0
 public ProcessTask <TNextTask, TPipeline> Process <TPipeline>(ProcessTaskHandler <TNextTask, TPipeline> task)
 {
     return(new ProcessTask <TNextTask, TPipeline>(task, this._queue));
 }
Пример #9
0
 internal ProcessTask(ProcessTaskHandler <TTask, TNextTask> task, TaskQueue <IStatement> queue)
 {
     this.Task = task;
     queue.Enqueue(this);
     this._queue = queue;
 }
Пример #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);
    }