Пример #1
0
        public IDictionary <string, string[]> Resolve(string[] inputs, string[] endNodes = null, string runtimeProfile = "")
        {
//            System.Diagnostics.Debugger.Launch();
            var endPaths        = endNodes ?? new string[0];
            var resolveContext  = new ResolveContext(resolveConfig, new Dictionary <string, ProjectNode>(), runtimeProfile);
            var inputProjects   = resolveContext.GetValidProjects(inputs);
            var dagRootProjects = reverse ? resolveContext.GetAllProjects() : inputProjects;

            var dag = new ProjectDAGBuilder(resolveContext, dagRootProjects, excludeNodes).BuildDAG();

            if (endPaths.Length > 0)
            {
                dag.Cut(v => MatchEnd(v.Data, endPaths));
            }

            var result = new Dictionary <string, string[]>();

            foreach (var project in inputProjects)
            {
                if (dag.GetVertex(project) != null)
                {
                    ProcessNode(dag.GetVertex(project), result);
                }
            }
            return(result);
        }
Пример #2
0
        public MSBuildPatch Resolve(string[] inputs, string runtimeProfile = "")
        {
            var resolveContext = new ResolveContext(resolveConfig, new Dictionary<string, ProjectNode>(), runtimeProfile);
            var projects = resolveContext.GetValidProjects(inputs);
            var dag = new ProjectDAGBuilder(resolveContext, projects).BuildDAG();
            var copyItemSets = CollectCopies(projects, dag, resolveContext);
            dag.Simplify();
            var compileProjects = dag.Out().OfType<ProjectNode>().Select(n => new ProjectItem(n.FullPath, n.Output)).ToArray();

            return new MSBuildPatch(compileProjects, copyItemSets);
        }
Пример #3
0
        public MSBuildPatch Resolve(string[] inputs, string runtimeProfile = "")
        {
            var resolveContext = new ResolveContext(resolveConfig, new Dictionary <string, ProjectNode>(), runtimeProfile);
            var projects       = resolveContext.GetValidProjects(inputs);
            var dag            = new ProjectDAGBuilder(resolveContext, projects).BuildDAG();
            var copyItemSets   = CollectCopies(projects, dag, resolveContext);

            dag.Simplify();
            var compileProjects = dag.Out().OfType <ProjectNode>().Select(n => new ProjectItem(n.FullPath, n.Output)).ToArray();

            return(new MSBuildPatch(compileProjects, copyItemSets));
        }
Пример #4
0
        public IDictionary<string, string[]> Resolve(string[] inputs, string[] endNodes = null, string runtimeProfile = "")
        {
            //            System.Diagnostics.Debugger.Launch();
            var endPaths = endNodes ?? new string[0];
            var resolveContext = new ResolveContext(resolveConfig, new Dictionary<string, ProjectNode>(), runtimeProfile);
            var inputProjects = resolveContext.GetValidProjects(inputs);
            var dagRootProjects = reverse ? resolveContext.GetAllProjects() : inputProjects;

            var dag = new ProjectDAGBuilder(resolveContext, dagRootProjects, excludeNodes).BuildDAG();
            if (endPaths.Length > 0)
            {
                dag.Cut(v => MatchEnd(v.Data, endPaths));
            }

            var result = new Dictionary<string, string[]>();
            foreach (var project in inputProjects)
            {
                if (dag.GetVertex(project) != null)
                {
                    ProcessNode(dag.GetVertex(project), result);
                }
            }
            return result;
        }