private static List <AstTaskNode> SortTasks(AstTask.AstContainerTaskNode container, IEnumerable <AstTaskNode> unsortedTasks) { var roots = new HashSet <AstTaskNode>(); var successors = new Dictionary <AstTaskNode, ICollection <AstTaskNode> >(); ComputeRootsAndSuccessors(container, unsortedTasks, roots, successors); return(FlowSorter.TopologicalSort(roots, successors)); }
private static List <AstTransformationNode> SortTransformations(IEnumerable <AstTransformationNode> unsortedTransformations) { var roots = new HashSet <AstTransformationNode>(); var successors = new Dictionary <AstTransformationNode, ICollection <AstTransformationNode> >(); ComputeRootsAndSuccessors(unsortedTransformations, roots, successors); return(FlowSorter.TopologicalSort(roots, successors)); }