コード例 #1
0
        internal BatchLoadInfo[] GetBachInfos()
        {
            string[]       tails   = MyDependencies.GetTails();
            Queue <string> sources = MyDependencies.GetSources(tails);

            IList <string> result = MyDependencies.TopologicalSort(sources);

            BatchLoadInfo[] infos = new BatchLoadInfo[result.Count];

            for (int i = 0; i <= result.Count - 1; i++)
            {
                infos[i] = MyNameInfoMap[result[i]];
            }

            return(infos);
        }
コード例 #2
0
        private ExpressionResultPair[] GetRootTails(string[] roots)
        {
            // No roots supplied so get everything
            if (roots.Length == 0)
            {
                return(MyDependencies.GetTails());
            }

            // Get the tail for each name
            ExpressionResultPair[] arr = new ExpressionResultPair[roots.Length];

            for (int i = 0; i <= arr.Length - 1; i++)
            {
                arr[i] = this.GetTailWithValidate(roots[i]);
            }

            return(arr);
        }