using Artemis.Core.Plugins.Models; using Artemis.Core.Services.Interfaces; using Artemis.Storage.Repositories.Interfaces; namespace Artemis.Core.Services { /// public class SettingsService : ISettingsService { private readonly PluginSettings _pluginSettings; internal SettingsService(IPluginSettingRepository pluginSettingRepository) { _pluginSettings = new PluginSettings(Constants.CorePluginInfo, pluginSettingRepository); } public PluginSetting GetSetting(string name, T defaultValue = default) { return _pluginSettings.GetSetting(name, defaultValue); } } /// /// A wrapper around plugin settings for internal use. /// Do not inject into a plugin, for plugins inject instead. /// public interface ISettingsService : IProtectedArtemisService { PluginSetting GetSetting(string name, T defaultValue = default); } }