コード例 #1
0
 public SettingsLoader(IEngineEnvironmentSettings environmentSettings)
 {
     _environmentSettings = environmentSettings;
     _paths                      = new Paths(environmentSettings);
     _userTemplateCache          = new TemplateCache(environmentSettings);
     _installUnitDescriptorCache = new InstallUnitDescriptorCache(environmentSettings);
 }
コード例 #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;
        }