| FileTypeSettingsBaseUpdateSettingInSettingsGroupT Method |
Checks whether the setting exists in the settings group. If the setting does exist, then it
is updated with the new value; if it does not exist, a new setting is created, but only
if the value is not the same as the default value (in which case the call is effectively ignored).
Namespace: Sdl.FileTypeSupport.Framework.Core.SettingsAssembly: Sdl.FileTypeSupport.Framework.Core.Settings (in Sdl.FileTypeSupport.Framework.Core.Settings.dll) Version: 1.0.0.0 (1.0.2551.2)
Syntaxprotected void UpdateSettingInSettingsGroup<T>(
ISettingsGroup settingsGroup,
string settingName,
T settingValue,
T defaultValue
)
Protected Sub UpdateSettingInSettingsGroup(Of T) (
settingsGroup As ISettingsGroup,
settingName As String,
settingValue As T,
defaultValue As T
)
protected:
generic<typename T>
void UpdateSettingInSettingsGroup(
ISettingsGroup^ settingsGroup,
String^ settingName,
T settingValue,
T defaultValue
)
member UpdateSettingInSettingsGroup :
settingsGroup : ISettingsGroup *
settingName : string *
settingValue : 'T *
defaultValue : 'T -> unit
Parameters
- settingsGroup
- Type: Sdl.Core.SettingsISettingsGroup
The settings group in which the setting should be saved. - settingName
- Type: SystemString
The name of the setting to save. - settingValue
- Type: T
The value of the setting to save. - defaultValue
- Type: T
The default value of the setting. This is used to prevent creating unnecessary
settings when the setting to be created is equal to the default value. This does not affect updating a setting,
it only applies when creating a new one.
Type Parameters
- T
- The type of the setting to save. The type must be the same as at the point of
retrieval, or it will not be returned again correctly. See GetSettingFromSettingsGroupT(ISettingsGroup, String, T).
See Also
Comments