Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }