Interface ISettingsService
A wrapper around plugin settings for miscellaneous use outside plugins
Do not inject into a plugin, for plugins inject PluginSettings instead.
public interface ISettingsService : IProtectedArtemisService
Methods
GetSetting<T>(string, T?)
Gets the setting with the provided name. If the setting does not exist yet, it is created.
PluginSetting<T> GetSetting<T>(string name, T? defaultValue = default)
Parameters
name
stringThe name of the setting, may not be longer than 128 characters
defaultValue
TThe default value to use if the setting does not exist yet
Returns
Type Parameters
T
The type of the setting, can be any serializable type
SaveAllSettings()
Saves all settings, obviously
void SaveAllSettings()