Search Results for

    Show / Hide Table of Contents

    Class SettingsGroup

    Abstract class providing common functionality for settings group concrete implementations

    Inheritance
    System.Object
    AbstractSettingsGroupBase
    SettingsGroup
    Implements
    ISettingsGroup
    System.ComponentModel.INotifyPropertyChanged
    System.ComponentModel.IEditableObject
    Inherited Members
    AbstractSettingsGroupBase._settingChangedDelegate
    AbstractSettingsGroupBase._propertyChangedDelegate
    AbstractSettingsGroupBase._parentEventHandlerAttached
    AbstractSettingsGroupBase._parentPropertyChangedEventHandlerAttached
    AbstractSettingsGroupBase._suspended
    AbstractSettingsGroupBase._suspendedEvents
    AbstractSettingsGroupBase.SuspendEvents()
    AbstractSettingsGroupBase.ResumeEvents()
    AbstractSettingsGroupBase.DiscardEvents()
    AbstractSettingsGroupBase.OnSettingChanged(String)
    AbstractSettingsGroupBase.OnSettingsChanged(IList<String>, Boolean)
    AbstractSettingsGroupBase.EventsSuspended
    AbstractSettingsGroupBase.SettingsChanged
    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
    Assembly: Sdl.Core.Settings.dll
    Syntax
    public abstract class SettingsGroup : AbstractSettingsGroupBase, ISettingsGroup

    Constructors

    SettingsGroup()

    Declaration
    protected SettingsGroup()

    Properties

    Id

    Gets the id of the settings group.

    Declaration
    public override string Id { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    AbstractSettingsGroupBase.Id

    Parent

    Gets the parent settings group in the parent bundle, or null if this settings group belongs to the root settings bundle.

    Declaration
    public override ISettingsGroup Parent { get; }
    Property Value
    Type Description
    ISettingsGroup
    Overrides
    AbstractSettingsGroupBase.Parent

    SettingsBundle

    The settings bundle this group belongs to

    Declaration
    public override ISettingsBundle SettingsBundle { get; set; }
    Property Value
    Type Description
    ISettingsBundle
    Overrides
    AbstractSettingsGroupBase.SettingsBundle

    Methods

    BeginEdit()

    Begins and edit on an object

    Declaration
    public override void BeginEdit()
    Overrides
    AbstractSettingsGroupBase.BeginEdit()

    CancelEdit()

    Discards changes since the last System.ComponentModel.IEditableObject.BeginEdit() call.

    Declaration
    public override void CancelEdit()
    Overrides
    AbstractSettingsGroupBase.CancelEdit()

    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
    AbstractSettingsGroupBase.CollectSettings(ISettingsGroup, List<String>)

    ContainsSetting(String)

    Returns true if settingId is found in the current settings collection or in any ancestor's settings collection

    Declaration
    public override bool ContainsSetting(string settingId)
    Parameters
    Type Name Description
    System.String settingId

    the settingsId to find

    Returns
    Type Description
    System.Boolean

    true if settingId is found in the current settings collection or in any ancestor's settings collection

    Overrides
    AbstractSettingsGroupBase.ContainsSetting(String)

    EndEdit()

    Pushes changes since the last System.ComponentModel.IEditableObject.BeginEdit() or System.ComponentModel.IBindingList.AddNew() call into the underlying object.

    Declaration
    public override void EndEdit()
    Overrides
    AbstractSettingsGroupBase.EndEdit()

    GetDefaultValue(String)

    Gets the default value for the sepcified settings. Always returns null. Override this method in extending classes to define default setting values.

    Declaration
    protected virtual object GetDefaultValue(string settingId)
    Parameters
    Type Name Description
    System.String settingId

    The setting id.

    Returns
    Type Description
    System.Object

    The default value, or null if no default value is available.

    GetSetting<T>(String)

    Gets the setting with the specified id.

    Declaration
    public override Setting<T> GetSetting<T>(string id)
    Parameters
    Type Name Description
    System.String id

    The id of the setting.

    Returns
    Type Description
    Setting<T>

    The setting.

    Type Parameters
    Name Description
    T

    The type of the setting value.

    Overrides
    AbstractSettingsGroupBase.GetSetting<T>(String)
    Remarks

    When no value is defined in the settings group itself, the parent chain is searched for an inherited value. If no inherited value can be found, the default value provided by the settings group implementation is returned.

    GetSetting<T>(String, T)

    Gets the setting with the specified id.

    Declaration
    public override Setting<T> GetSetting<T>(string settingId, T defaultValue)
    Parameters
    Type Name Description
    System.String settingId

    The id of the setting.

    T defaultValue

    The default value for the setting if no value can be found.

    Returns
    Type Description
    Setting<T>

    The setting.

    Type Parameters
    Name Description
    T

    The type of the setting value.

    Overrides
    Sdl.Core.Settings.AbstractSettingsGroupBase.GetSetting<T>(System.String, T)
    Remarks

    When no value is defined in the settings group itself, the parent chain is searched for an inherited value. If no inherited value can be found, the default value provided by the settings group implementation is returned.

    GetSetting<T>(String, out T)

    Gets the setting with the specified id.

    Declaration
    public override bool GetSetting<T>(string settingId, out T value)
    Parameters
    Type Name Description
    System.String settingId

    The id of the setting.

    T value

    The value of the setting.

    Returns
    Type Description
    System.Boolean

    True if a setting value has been returned.

    Type Parameters
    Name Description
    T

    The type of the setting value.

    Overrides
    Sdl.Core.Settings.AbstractSettingsGroupBase.GetSetting<T>(System.String, T)
    Remarks

    When no value is defined in the settings group itself, the parent chain is searched for an inherited value. If no inherited value can be found, null is returned.

    GetSetting<T>(String, out Setting<T>)

    Gets the setting with the specified id.

    Declaration
    public override bool GetSetting<T>(string settingId, out Setting<T> setting)
    Parameters
    Type Name Description
    System.String settingId

    The id of the setting.

    Setting<T> setting

    The setting, or null if no value was defined.

    Returns
    Type Description
    System.Boolean

    True if a setting value has been returned.

    Type Parameters
    Name Description
    T

    The type of the setting value.

    Overrides
    Sdl.Core.Settings.AbstractSettingsGroupBase.GetSetting<T>(System.String, Sdl.Core.Settings.Setting<T>)
    Remarks

    When no value is defined in the settings group itself, the parent chain is searched for an inherited value. If no inherited value can be found, null is returned.

    GetSettingIds()

    Gets the setting ids from the current settings group.

    Declaration
    public override IEnumerable<string> GetSettingIds()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.String>

    The setting ids.

    Overrides
    AbstractSettingsGroupBase.GetSettingIds()

    ImportSettings(ISettingsGroup)

    Imports the settings from another group into this one. Resets the current settings before importing the settings from the other group.

    Declaration
    public override void ImportSettings(ISettingsGroup otherGroup)
    Parameters
    Type Name Description
    ISettingsGroup otherGroup

    The group which the settings are imported from

    Overrides
    AbstractSettingsGroupBase.ImportSettings(ISettingsGroup)

    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
    AbstractSettingsGroupBase.parent_PropertyChanged(Object, PropertyChangedEventArgs)

    parent_SettingsChanged(Object, SettingsChangedEventArgs)

    Declaration
    protected override void parent_SettingsChanged(object sender, SettingsChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    SettingsChangedEventArgs e
    Overrides
    AbstractSettingsGroupBase.parent_SettingsChanged(Object, SettingsChangedEventArgs)

    RemoveSetting(String)

    Removes a local setting from the this group. Returns true if the setting was successfully removed, false otherwise. i.e. if the setting doesn't exist, false is returned.

    Declaration
    public override bool RemoveSetting(string settingId)
    Parameters
    Type Name Description
    System.String settingId

    The id of the setting to remove

    Returns
    Type Description
    System.Boolean

    boolean indicating whether the setting was successfully removed

    Overrides
    AbstractSettingsGroupBase.RemoveSetting(String)

    Reset()

    Resets all settings locally defined in this settings group.

    Declaration
    public override void Reset()
    Overrides
    AbstractSettingsGroupBase.Reset()

    Events

    PropertyChanged

    Raised when a property value changes.

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    ISettingsGroup
    System.ComponentModel.INotifyPropertyChanged
    System.ComponentModel.IEditableObject

    On this page

    Back to top Generated by DocFX