Exemple #1
0
 public ModuleReader(Solution solution, IReadOnlyDictionary <string, Template> templates,
                     TemplateReader templateReader)
 {
     this.solution       = solution;
     this.templates      = templates;
     this.templateReader = templateReader;
 }
Exemple #2
0
        public void ReadFullSolution(PropertyElement[] propertyOverrides = null,
                                     string masterConfiguration          = null,
                                     string[] configurationFilter        = null)
        {
            if (SolutionElement == null)
            {
                ParseSolution();
            }


            Log.Heading("Reading full solution (templates and modules)");
            using (new CompositeDisposable(
                       new Log.ScopedIndent(),
                       new Log.ScopedTimer(Log.Level.Info, "Read Full Solution")))
            {
                if (!string.IsNullOrEmpty(masterConfiguration))
                {
                    Solution.FilterMasterConfigurations(new[] { masterConfiguration });
                }

                if (configurationFilter != null)
                {
                    Solution.FilterConfigurations(configurationFilter);
                }


                solutionReader.ApplyPropertyOverrides(propertyOverrides);
                solutionReader.LoadIncludes();

                templateReader = new TemplateReader(Solution.ConfigurationGroups,
                                                    solutionReader.TemplateDefaultSettings);

                ReadTemplates(TemplateElements.Concat(solutionReader.IncludedTemplates));
                ReadModules(ModuleElements.Concat(solutionReader.IncludedModules));
            }
        }