Interface ISettingsManager
Defines methods to manage the settings.
Namespace: Sartorius.SAF.Settings
Assembly: Sartorius.SAF.dll
Syntax
public interface ISettingsManager
Properties
View SourceIsActive
Indicates whether the ISettingsManager is active.
Declaration
bool IsActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Might be inactive if there is no underlying implementation of the ISettingService.
Methods
View SourceDeleteSetting(SettingScope, String)
Deletes the setting with the given key
.
Declaration
void DeleteSetting(SettingScope settingScope, string key)
Parameters
Type | Name | Description |
---|---|---|
SettingScope | settingScope | The SettingScope. |
System.String | key | The setting key. |
ReadSetting<T>(SettingScope, String)
Reads the setting with the given key
.
Declaration
T ReadSetting<T>(SettingScope settingScope, string key)
where T : class
Parameters
Type | Name | Description |
---|---|---|
SettingScope | settingScope | The SettingScope. |
System.String | key | The setting key. |
Returns
Type | Description |
---|---|
T | The setting, or null if not setting was found. |
Type Parameters
Name | Description |
---|---|
T |
ReadUserSetting<T>(String)
Reads the user setting with the given key
.
Declaration
T ReadUserSetting<T>(string key)
where T : class
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The setting key. |
Returns
Type | Description |
---|---|
T | The setting or null if not setting was found. |
Type Parameters
Name | Description |
---|---|
T |
SaveSetting(SettingScope, String, Object)
Saves a setting with the given key
.
Declaration
void SaveSetting(SettingScope settingScope, string key, object value)
Parameters
Type | Name | Description |
---|---|---|
SettingScope | settingScope | The SettingScope. |
System.String | key | The setting key. |
System.Object | value | The setting value. |
SaveUserSetting(String, Object)
Saves a user setting with the given key
.
Declaration
void SaveUserSetting(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The setting key. |
System.Object | value | The setting value. |