Interface ISettingsService
A wrapper around plugin settings for miscellaneous use outside plugins
Do not inject into a plugin, for plugins inject PluginSettings instead.
Namespace: Artemis.Core.Services
Assembly: Artemis.Core.dll
Syntax
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.
Declaration
PluginSetting<T> GetSetting<T>(string name, T? defaultValue = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the setting |
T | defaultValue | The default value to use if the setting does not exist yet |
Returns
Type | Description |
---|---|
PluginSetting<T> |
Type Parameters
Name | Description |
---|---|
T | The type of the setting, can be any serializable type |
SaveAllSettings()
Saves all settings, obviously
Declaration
void SaveAllSettings()