コード例 #1
0
ファイル: JobRuntime.cs プロジェクト: kapitanov/diploma
        public JobRuntime(
            IDataFlowConnection connection,
            DataContractOptions dtoOptions,
            Japi.Job job,
            IJobResultReader jobResultReader)
        {
            if (connection == null)
                throw new ArgumentNullException("connection");
            if (dtoOptions == null)
                throw new ArgumentNullException("dtoOptions");
            if (job  == null)
                throw new ArgumentNullException("job");
            if (jobResultReader == null)
                throw new ArgumentNullException("job");

            this.connection = connection;
            this.dtoOptions = dtoOptions;
            this.job = job;
            this.jobResultReader = jobResultReader;

            executionSequence = new JobExecutionSequence(this);
            JobStateIndeterminable();
        }
コード例 #2
0
 public static TaskWithCounter Create(Japi.Task task)
 {
     return new TaskWithCounter(task, task.Dependencies.Count);
 }
コード例 #3
0
            public static TaskWithCounter Update(TaskWithCounter currentTask, Japi.Task selectedTask)
            {
                if (currentTask.Task.Dependencies.Contains(selectedTask))
                {
                    return new TaskWithCounter(currentTask.Task, currentTask.Dependencies - 1);
                }

                return new TaskWithCounter(currentTask.Task, currentTask.Dependencies);
            }
コード例 #4
0
 public TaskWithCounter(Japi.Task task, int dependencies)
 {
     Task = task;
     Dependencies = dependencies;
 }