public Solution( string file, Version formatVersion, ISolutionSettings settings, IEnumerable <string> files, IEnumerable <IProject> projects) { File = file; FormatVersion = formatVersion; Settings = settings; Files = files; Projects = projects; }
public static ISolution Read(string path) { string directory = Path.GetDirectoryName(path); ISolutionSettings solutionSettings = SettingsReader.ReadSolutionSettings(directory); IProjectSettings projectSettings = SettingsReader.ReadProjectSettings(directory); string[] lines = File.ReadAllLines(path) .Select(x => x.Trim()) .Where(x => !string.IsNullOrEmpty(x)) .ToArray(); Version formatVersion = ReadFormatVersion(lines); List <string> files = new List <string>(); IEnumerable <IProject> projects = ReadProjects(lines, directory, solutionSettings.IgnoredProjects, projectSettings, files); return(new Solution(path, formatVersion, solutionSettings, files, projects.ToList())); }