Esempio n. 1
0
        /// <summary>
        /// Builds all of the targets in this project file.
        /// </summary>
        /// <returns></returns>
        public IEnumerable <TargetResult> BuildAll()
        {
            var    results       = new List <TargetResult>();
            string targetTagName = @"Target",
                   nameTagName   = @"Name";

            foreach (var target in this.GetAllTags(targetTagName).Where(x => x.Attribute(nameTagName) != null))
            {
                var logger = new SolutionCapturingLogger();
                var name   = target.Attribute(nameTagName).Value;
                if (this.Build(name, new ILogger[] { logger }) && logger.SolutionsBuilt.FirstOrDefault() != null)
                {
                    results.Add(new TargetResult()
                    {
                        Name       = name,
                        ItemsBuilt = logger.SolutionsBuilt
                    });
                }
            }
            return(results);
        }
Esempio n. 2
0
        /// <summary>
        /// Builds all of the targets in this project file.
        /// </summary>
        /// <returns></returns>
        public IEnumerable<TargetResult> BuildAll()
        {
            var results = new List<TargetResult>();
            string targetTagName = @"Target",
                nameTagName = @"Name";

            foreach (var target in this.GetAllTags(targetTagName).Where(x => x.Attribute(nameTagName) != null))
            {
                var logger = new SolutionCapturingLogger();
                var name = target.Attribute(nameTagName).Value;
                if (this.Build(name, new ILogger[] { logger }) && logger.SolutionsBuilt.FirstOrDefault() != null)
                {
                    results.Add(new TargetResult()
                    {
                        Name = name,
                        ItemsBuilt = logger.SolutionsBuilt
                    });
                }
            }
            return results;
        }