Пример #1
0
        public IEnumerable <string> Generate(IEnumerable <string> projects)
        {
            var list     = _listGenerator.Generate(projects.ToArray());
            var runInfos = _buildOptimizer.AssembleBuildConfiguration(list);

            return(runInfos.Where(x => x.ShouldBeBuilt).Select(x => getProject(x)));
        }
Пример #2
0
        private void run()
        {
            try
            {
                var messages = new List <RealtimeChangeMessage>();
                lock (_messages)
                {
                    var relations = _listGenerator.Generate(_messages.GroupBy(x => x.Project).Select(x => x.Key).ToArray());
                    relations
                    .Where(x => _messages.Count(y => y.Project.Equals(x)) == 0).ToList()
                    .ForEach(x => _messages.Add(new RealtimeChangeMessage(x, null, null)));
                    _messages.ForEach(x =>
                    {
                        messages.Add(x);
                    });
                    _messages.Clear();
                }

                var tempFiles = assembleSolution(messages);
                if (tempFiles != null)
                {
                    _preProcessor.Invoke(tempFiles);
                }
            }
            catch (Exception ex)
            {
                Logger.WriteError(ex.ToString());
            }
        }
        private RunInfo[] getPrioritizedList(string[] changedProjects)
        {
            var projectsAndDependencies = _listGenerator.Generate(changedProjects);
            var list = _buildOptimizer.AssembleBuildConfiguration(projectsAndDependencies);

            list = mergeWithAbortedBuilds(list);
            return(list);
        }
        private RunInfo[] getPrioritizedList(ProjectChangeMessage message)
        {
            var projectsAndDependencies = _listGenerator.Generate(getListOfChangedProjects(message));
            var list = _buildOptimizer.AssembleBuildConfiguration(projectsAndDependencies);

            list = preProcessBuildRun(list);
            list = mergeWithAbortedBuilds(list);
            return(list);
        }