コード例 #1
0
        public bool DependenciesAreSatisfied(ProcessState processState)
        {
            if (processState.CompletedProcessStep.Contains(this) || processState.StartedProcessSteps.Contains(this))
            {
                return(false);
            }

            bool dependenciesAreSatisfied = _processStepDependencies
                                            .RequiredSteps
                                            .All(dependencies
                                                 => processState.CompletedProcessStep.Contains(dependencies));

            bool stepIsNotObselete = !_processStepDependencies
                                     .ObseleteIfAnyCompletedSteps
                                     .Any(obseletingStep
                                          => processState.CompletedProcessStep.Contains(obseletingStep));

            return(dependenciesAreSatisfied && stepIsNotObselete);
        }
コード例 #2
0
 public bool IsComplete(ProcessState processState)
 {
     return(_completionCondition.All(x => processState.CompletedProcessStep.Contains(x)));
 }
コード例 #3
0
 public bool IsComplete(ProcessState processState)
 {
     return(!_messagesNeededForCompletion.Any() || _messagesNeededForCompletion.All(x => processState.ReceivedMessages.Contains(x)));
 }
コード例 #4
0
        public ProcessStep GetNextProcessStep(ProcessState processState)
        {
            ProcessStep nextProcessStep = _processSteps.FirstOrDefault(x => x.DependenciesAreSatisfied(processState));

            return(nextProcessStep);
        }