private Dictionary <string, StepDependencies> UpdateDependenciesWithMissingSteps(Dictionary <string, StepDependencies> dependencies, List <string> all) { foreach (var line in all) { if (dependencies.ContainsKey(line)) { continue; } var dependency = new StepDependencies { Step = line }; dependencies.Add(line, dependency); } return(dependencies); }
private Dictionary <string, StepDependencies> ComputeDependencies(List <Step> steps) { var stepDepDict = new Dictionary <string, StepDependencies>(); foreach (var step in steps) { if (stepDepDict.ContainsKey(step.BeforeCanBegin)) { stepDepDict[step.BeforeCanBegin].IsBlockedBy.Add(step.MustBeFinished); } else { var dependency = new StepDependencies { Step = step.BeforeCanBegin }; dependency.IsBlockedBy.Add(step.MustBeFinished); stepDepDict.Add(step.BeforeCanBegin, dependency); } } return(stepDepDict); }