internal SettingsService(IPluginSettingRepository pluginSettingRepository) { var pluginInfo = new PluginInfo { Guid = Guid.Parse("ffffffff-ffff-ffff-ffff-ffffffffffff"), Name = "Artemis Core" }; _pluginSettings = new PluginSettings(pluginInfo, pluginSettingRepository); }
internal PluginSetting(PluginInfo pluginInfo, IPluginSettingRepository pluginSettingRepository, PluginSettingEntity pluginSettingEntity) { _pluginInfo = pluginInfo; _pluginSettingRepository = pluginSettingRepository; _pluginSettingEntity = pluginSettingEntity; Name = pluginSettingEntity.Name; Value = JsonConvert.DeserializeObject <T>(pluginSettingEntity.Value); }
internal PluginSetting(PluginInfo pluginInfo, IPluginSettingRepository pluginSettingRepository, PluginSettingEntity pluginSettingEntity) { _pluginInfo = pluginInfo; _pluginSettingRepository = pluginSettingRepository; _pluginSettingEntity = pluginSettingEntity; Name = pluginSettingEntity.Name; try { Value = JsonConvert.DeserializeObject <T>(pluginSettingEntity.Value); } catch (JsonReaderException) { Value = default; } }
internal PluginSettings(PluginInfo pluginInfo, IPluginSettingRepository pluginSettingRepository) { _pluginInfo = pluginInfo; _pluginSettingRepository = pluginSettingRepository; _settingEntities = pluginSettingRepository.GetByPluginGuid(_pluginInfo.Guid).ToDictionary(se => se.Name); }
internal PluginSettingsProvider(IPluginSettingRepository pluginSettingRepository) { _pluginSettingRepository = pluginSettingRepository; }
internal PluginSettings(PluginInfo pluginInfo, IPluginSettingRepository pluginSettingRepository) { _pluginInfo = pluginInfo; _pluginSettingRepository = pluginSettingRepository; _settingEntities = new Dictionary <string, object>(); }