public SettingsLoader(IEngineEnvironmentSettings environmentSettings) { _environmentSettings = environmentSettings; _paths = new Paths(environmentSettings); _userTemplateCache = new TemplateCache(environmentSettings); _installUnitDescriptorCache = new InstallUnitDescriptorCache(environmentSettings); }
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; }