Class JsonSettingsGroup
Json Implementation of ISettingsGroup
Implements
Inherited Members
Namespace: Sdl.Core.Settings.Implementation.Json
Assembly: Sdl.Core.Settings.dll
Syntax
public class JsonSettingsGroup : AbstractSettingsGroupBase, ISettingsGroup, ICloneable
Constructors
JsonSettingsGroup()
Public constructor
Declaration
public JsonSettingsGroup()
JsonSettingsGroup(JsonSettingsGroup)
Copy constructor
Declaration
public JsonSettingsGroup(JsonSettingsGroup other)
Parameters
Type | Name | Description |
---|---|---|
JsonSettingsGroup | other |
Properties
Id
Id of group
Declaration
public override string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Parent
Parent group
Declaration
public override ISettingsGroup Parent { get; }
Property Value
Type | Description |
---|---|
ISettingsGroup |
Overrides
SettingsBundle
The settings bundle this group belongs to
Declaration
public override ISettingsBundle SettingsBundle { get; set; }
Property Value
Type | Description |
---|---|
ISettingsBundle |
Overrides
Methods
BeginEdit()
NOT IMPLEMENTED
Declaration
public override void BeginEdit()
Overrides
CancelEdit()
NOT IMPLEMENTED
Declaration
public override void CancelEdit()
Overrides
Clone()
Cones this group
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object |
CollectSettings(ISettingsGroup, List<String>)
Declaration
protected override void CollectSettings(ISettingsGroup settingsGroup, List<string> keys)
Parameters
Type | Name | Description |
---|---|---|
ISettingsGroup | settingsGroup | |
System.Collections.Generic.List<System.String> | keys |
Overrides
ContainsSetting(String)
Idicates if a particular setting exists in this group
Declaration
public override bool ContainsSetting(string settingId)
Parameters
Type | Name | Description |
---|---|---|
System.String | settingId |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
EndEdit()
NOT IMPLEMENTED
Declaration
public override void EndEdit()
Overrides
GetSetting<T>(String)
Gets a particular setting
Declaration
public override Setting<T> GetSetting<T>(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Id of setting |
Returns
Type | Description |
---|---|
Setting<T> |
Type Parameters
Name | Description |
---|---|
T | Type of setting |
Overrides
GetSetting<T>(String, T)
Gets a particular setting, creating it with a default value if it doesn't exist already
Declaration
public override Setting<T> GetSetting<T>(string settingId, T defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | settingId | Id of setting |
T | defaultValue | Default value of this setting |
Returns
Type | Description |
---|---|
Setting<T> |
Type Parameters
Name | Description |
---|---|
T | Type of setting |
Overrides
GetSetting<T>(String, out T)
Gets a particular setting
Declaration
public override bool GetSetting<T>(string settingId, out T value)
Parameters
Type | Name | Description |
---|---|---|
System.String | settingId | Id of setting |
T | value | Value of setting or default if not in group |
Returns
Type | Description |
---|---|
System.Boolean | true if setting was retrieved |
Type Parameters
Name | Description |
---|---|
T | Type of setting |
Overrides
GetSetting<T>(String, out Setting<T>)
Gets a particular setting
Declaration
public override bool GetSetting<T>(string settingId, out Setting<T> setting)
Parameters
Type | Name | Description |
---|---|---|
System.String | settingId | Id of setting |
Setting<T> | setting | setting |
Returns
Type | Description |
---|---|
System.Boolean | true if setting returned |
Type Parameters
Name | Description |
---|---|
T | Type of setting |
Overrides
GetSettingIds()
Gets all setting IDs in this group
Declaration
public override IEnumerable<string> GetSettingIds()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Overrides
ImportSettings(ISettingsGroup)
Imports settings from another group into this one
Declaration
public override void ImportSettings(ISettingsGroup otherGroup)
Parameters
Type | Name | Description |
---|---|---|
ISettingsGroup | otherGroup |
Overrides
OnInit(ISettingsBundle)
Called when SettingsBungle is set.
Declaration
protected virtual void OnInit(ISettingsBundle settingsBundle)
Parameters
Type | Name | Description |
---|---|---|
ISettingsBundle | settingsBundle | the value of the new ISettingsBundle |
parent_PropertyChanged(Object, PropertyChangedEventArgs)
Declaration
protected override void parent_PropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
System.ComponentModel.PropertyChangedEventArgs | e |
Overrides
parent_SettingsChanged(Object, SettingsChangedEventArgs)
Declaration
protected override void parent_SettingsChanged(object sender, SettingsChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
SettingsChangedEventArgs | e |
Overrides
RemoveSetting(String)
Removes a specific setting from this group
Declaration
public override bool RemoveSetting(string settingId)
Parameters
Type | Name | Description |
---|---|---|
System.String | settingId |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Reset()
Resets the settings in this group, removing them
Declaration
public override void Reset()