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