示例#1
0
        //private static PluginResolver pluginManager;
        private static void BuildStepsRecursively(Builder builder, ICollection <BuildStep> steps, int stepsPerLevel, int maxLevel, BuildStep curParent = null, int curLevel = 0)
        {
            if (curLevel == maxLevel)
            {
                return;
            }

            for (var i = 0; i < stepsPerLevel; ++i)
            {
                BuildStep step = builder.Root.Add(new DoNothingCommand());
                if (curParent != null)
                {
                    BuildStep.LinkBuildSteps(curParent, step);
                }
                BuildStepsRecursively(builder, steps, stepsPerLevel, maxLevel, step, curLevel + 1);
                steps.Add(step);
            }
        }
示例#2
0
文件: Builder.cs 项目: glepag1/stride
 private void ComputeDependencyGraph(Dictionary <string, KeyValuePair <BuildStep, HashSet <string> > > contentBuildSteps)
 {
     foreach (var item in contentBuildSteps)
     {
         var step         = item.Value.Key;
         var dependencies = item.Value.Value;
         foreach (var dependency in dependencies)
         {
             KeyValuePair <BuildStep, HashSet <string> > deps;
             if (contentBuildSteps.TryGetValue(dependency, out deps))
             {
                 BuildStep.LinkBuildSteps(deps.Key, step);
             }
             else
             {
                 // TODO: Either something is wrong, or it's because dependencies added afterwise (incremental) are not supported yet
                 Logger.Error($"BuildStep [{step}] depends on [{dependency}] but nothing that generates it could be found (or maybe incremental dependencies need to be implemented)");
             }
         }
     }
 }