Ejemplo n.º 1
0
 public SettingsLoader(IEngineEnvironmentSettings environmentSettings)
 {
     _environmentSettings = environmentSettings;
     _paths                      = new Paths(environmentSettings);
     _userTemplateCache          = new TemplateCache(environmentSettings);
     _installUnitDescriptorCache = new InstallUnitDescriptorCache(environmentSettings);
 }
Ejemplo n.º 2
0
        private void EnsureInstallDescriptorsLoaded()
        {
            if (_installUnitDescriptorsLoaded)
            {
                return;
            }

            string  descriptorFileContents = _paths.ReadAllText(_paths.User.InstallUnitDescriptorsFile, "{}");
            JObject parsed = JObject.Parse(descriptorFileContents);

            _installUnitDescriptorCache   = InstallUnitDescriptorCache.FromJObject(_environmentSettings, parsed);
            _installUnitDescriptorsLoaded = true;
        }