Beispiel #1
0
        private IEnumerable <ITask> CreateProjectLevelTasks(SolutionInfo solutionInfo, IEnumerable <ProjectInfo> projects)
        {
            var result = new List <ITask>();

            foreach (var projectInfo in projects)
            {
                solutionInfo.AddProject(projectInfo);
                var scriptTasks = CreateProjectTasks(projectInfo);
                var uniqueTasks = GetNewUniqueScriptTasks(result, scriptTasks);
                result.AddRange(uniqueTasks);
            }
            return(result);
        }
Beispiel #2
0
        public ISolutionInfo FromFile(string filePath)
        {
            if (!File.Exists(filePath))
            {
                throw new FileNotFoundException("Unable to find file", filePath);
            }

            var file = new FileInfo(filePath);

            solution = new SolutionInfo(file.Name, file.DirectoryName);

            foreach (var project in ResolveProjectFilesFrom(file))
            {
                solution.AddProject(project);
            }

            return(solution);
        }