/// <summary> /// Initializes a new instance of the <see cref="Settings" /> class. /// </summary> public Settings([NotNull] ISettingsElement settingsElement, [NotNull] ITypeBasedSimpleSerializerAggregator typeBasedSimpleSerializerAggregator) { _typeBasedSimpleSerializerAggregator = typeBasedSimpleSerializerAggregator; foreach (var setting in settingsElement.AllSettings) { _settingNameToSettingMap[setting.Name] = new Setting(setting); } }
/// <summary> /// Initializes a new instance of the <see cref="PluginSettings" /> class. /// </summary> public PluginSettings([NotNull] ISettings globalSettings, ISettingsElement pluginSettingsElementElement, [NotNull] ITypeBasedSimpleSerializerAggregator typeBasedSimpleSerializerAggregator) { _globalSettings = globalSettings; _pluginSettings = new Settings(pluginSettingsElementElement, typeBasedSimpleSerializerAggregator); foreach (var setting in _globalSettings.AllSettings) { _settingNameToSettingMap[setting.Name] = setting; } // Override global settings with plugin settings foreach (var setting in _pluginSettings.AllSettings) { _settingNameToSettingMap[setting.Name] = setting; } }