public Solution LoadFrom(IFileSystem fileSystem, string filePath)
        {
            Config = fileSystem.LoadFromFile<SolutionConfig>(filePath);
            var solution = new Solution { Mode = SolutionMode.Classic };

            solution.Name = Config.Name;
            solution.SourceFolder = Config.SourceFolder;
            solution.FastBuildCommand = Config.FastBuildCommand;
            solution.BuildCommand = Config.BuildCommand;
            solution.NugetSpecFolder = Config.NugetSpecFolder;
            solution.AddFeeds(Config.Feeds);

            return solution;
        }
Esempio n. 2
0
        public Solution ToSolution()
        {
            var solution = new Solution {Name = Name};

            SourceFolderFlag.IfNotEmpty(x => solution.SourceFolder = x);
            NuspecFolderFlag.IfNotEmpty(x => solution.NugetSpecFolder = x);

            FeedsFlag.IfNotEmpty(x =>
            {
                solution.ClearFeeds();
                solution.AddFeeds(x.GetFeeds());
            });

            return solution;
        }