예제 #1
0
        private void StartAvailableProcessSteps()
        {
            while (true)
            {
                ProcessStep processStep = _processDependencyGraph.GetNextProcessStep(_processState);

                if (processStep == null)
                {
                    break;
                }

                Console.WriteLine("Started: " + processStep.Name);
                processStep.Start();
                _processState.ProcessStarted(processStep);
            }
        }
예제 #2
0
 public void ProcessStarted(ProcessStep processStep)
 {
     _startedProcessSteps.Add(processStep);
 }
예제 #3
0
 public void CompleteStep(ProcessStep processStep)
 {
     _completedProcessStep.Add(processStep);
     _startedProcessSteps.Remove(processStep);
 }
예제 #4
0
        public ProcessStep GetNextProcessStep(ProcessState processState)
        {
            ProcessStep nextProcessStep = _processSteps.FirstOrDefault(x => x.DependenciesAreSatisfied(processState));

            return(nextProcessStep);
        }