Class JsonSettingsBundle
Implementation of ISettingsBundle using Dictionary as backing store for JSON serialized settings
Inheritance
System.Object
JsonSettingsBundle
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Sdl.Core.Settings.Implementation.Json
Assembly: Sdl.Core.Settings.dll
Syntax
public class JsonSettingsBundle : ISettingsBundle
Constructors
JsonSettingsBundle()
Public constructor
Declaration
public JsonSettingsBundle()
Properties
IsDefault
Is Defalut setting bundle
Declaration
public bool IsDefault { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsEmpty
Is empty
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Parent
Parent SettingsBundle
Declaration
public ISettingsBundle Parent { get; set; }
Property Value
Type | Description |
---|---|
ISettingsBundle |
Methods
AddSettingsGroup(ISettingsGroup)
Add a settings group to this bundle if it does not already exist
Declaration
public bool AddSettingsGroup(ISettingsGroup settingsGroup)
Parameters
Type | Name | Description |
---|---|---|
ISettingsGroup | settingsGroup |
Returns
Type | Description |
---|---|
System.Boolean |
Assign(ISettingsBundle)
Assign and existing SettingsBundle to this one only if the bundle is empty
Declaration
public void Assign(ISettingsBundle settings)
Parameters
Type | Name | Description |
---|---|---|
ISettingsBundle | settings |
ContainsSettingsGroup(String)
Checks to see if this SettingsBundle contains a certain SettingsGroup
Declaration
public bool ContainsSettingsGroup(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
Returns
Type | Description |
---|---|
System.Boolean |
GetSettingsGroup(String)
Gets a specific settings group based on ID
Declaration
public ISettingsGroup GetSettingsGroup(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
Returns
Type | Description |
---|---|
ISettingsGroup |
GetSettingsGroup<T>()
NOT IMPLEMENTED!!!
Declaration
public T GetSettingsGroup<T>()
where T : ISettingsGroup, new()
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetSettingsGroup<T>(String)
NOT IMPLEMENTED!!!
Declaration
public T GetSettingsGroup<T>(string id)
where T : ISettingsGroup, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetSettingsGroupIds()
Gets all of the IDs for the settings groups in this SettingsBundle
Declaration
public IEnumerable<string> GetSettingsGroupIds()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
RemoveSettingsGroup(String)
Removes a specific SettingsGroup from this SettingsBundle
Declaration
public void RemoveSettingsGroup(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id |
Reset()
Resets all SettingsGroups in this SettingsBundle
Declaration
public void Reset()