Click or drag to resize

CategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings Class

Represents the base class for application settings that are synchronized with a categorized section in a configuration file and will perform bi-directional synchronization of elements marked with TValueExpressionAttribute to an external source, e.g., user interface elements.
Inheritance Hierarchy
SystemObject
  GSF.ConfigurationSettingsBase
    GSF.ConfigurationCategorizedSettingsBase
      GSF.ConfigurationCategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings
        GSF.ConfigurationCategorizedSettingsBaseTCategorizedSettings

Namespace: GSF.Configuration
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.181-beta
Syntax
public abstract class CategorizedSettingsBase<TValueExpressionAttribute, TCategorizedSettings> : CategorizedSettingsBase
where TValueExpressionAttribute : Attribute, IValueExpressionAttribute
where TCategorizedSettings : CategorizedSettingsBase
View Source

Type Parameters

TValueExpressionAttribute
Type of IValueExpressionAttribute used for run-time value synchronization.
TCategorizedSettings
Type of derived CategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings.

The CategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings type exposes the following members.

Constructors
 NameDescription
Protected methodCategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings(String, TypeRegistry) Creates a new instance of the CategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings class for the application's configuration file.
Protected methodCategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings(String, Boolean, Boolean, TypeRegistry) Creates a new instance of the CategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings class for the application's configuration file.
Protected methodCategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings(ConfigurationFile, String, Boolean, Boolean, Boolean, TypeRegistry) Creates a new instance of the CategorizedSettingsBaseTValueExpressionAttribute, TCategorizedSettings class for the application's configuration file.
Top
Properties
 NameDescription
Public propertyCategoryName Gets or sets default category name of section used to access settings in configuration file.
(Inherited from CategorizedSettingsBase)
Protected propertyConfigFile Gets or sets reference to working configuration file.
(Inherited from CategorizedSettingsBase)
Public propertyCulture Gets or sets the CultureInfo to use for the conversion of setting values to and from String.
(Inherited from SettingsBase)
Public propertyItem Gets or sets the value of the specified field or property.
(Inherited from SettingsBase)
Protected propertyMemberAccessBindingFlags Gets or sets BindingFlags used to access fields and properties of derived class.
(Inherited from SettingsBase)
Public propertyRequireSerializeSettingAttribute Gets or sets flag that determines if SerializeSettingAttribute is required to exist before a field or property is serialized to the configuration file; defaults to False.
(Inherited from SettingsBase)
Public propertyUseCategoryAttributes Gets or sets value that determines whether a CategoryAttribute applied to a field or property will be used for the category name.
(Inherited from CategorizedSettingsBase)
Top
Methods
 NameDescription
Protected methodCreateSetting Create setting in configuration file if it doesn't already exist. This method is for internal use.
(Inherited from CategorizedSettingsBase)
Public methodCreateValue Adds a setting to the application's configuration file, if it doesn't already exist.
(Inherited from SettingsBase)
Protected methodDeriveDefaultValue Attempts to get best default value for given member.
(Inherited from SettingsBase)
Public methodDispose Releases all the resources used by the CategorizedSettingsBase object.
(Inherited from SettingsBase)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the CategorizedSettingsBase object and optionally releases the managed resources.
(Inherited from SettingsBase)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodExecuteActionForFields Executes specified action over all public derived class member fields.
(Inherited from SettingsBase)
Protected methodExecuteActionForProperties Executes specified action over all public derived class properties.
(Inherited from SettingsBase)
Protected methodFinalize Releases the unmanaged resources before the CategorizedSettingsBase object is reclaimed by GC.
(Inherited from SettingsBase)
Protected methodGetAttributeValueTAttribute, TValue Attempts to find specified attribute and return specified value.
(Inherited from SettingsBase)
Public methodGetDefaultValue Gets the default value specified by DefaultValueAttribute, if any, applied to the specified field or property.
(Inherited from SettingsBase)
Public methodGetEncryptKey Gets the optional private encryption key specified by EncryptSettingAttribute, if any, applied to the specified field or property.
(Inherited from SettingsBase)
Public methodGetEncryptStatus Gets the encryption status specified by EncryptSettingAttribute, if any, applied to the specified field or property.
(Inherited from SettingsBase)
Public methodGetEnumerator Returns an enumerator based on String elements that iterates over the field and property names of this class that are targeted for serialization to the configuration file.
(Inherited from SettingsBase)
Public methodGetFieldCategoryName Gets the category name to use for the specified field or property.
(Inherited from CategorizedSettingsBase)
Public methodGetFieldDescription Gets the description specified by DescriptionAttribute, if any, applied to the specified field or property.
(Inherited from CategorizedSettingsBase)
Public methodGetFieldSettingScope Gets the SettingScope specified by UserScopedSettingAttribute, if any, applied to the specified field or property.
(Inherited from CategorizedSettingsBase)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetSettingName Gets setting name to use for specified field or property.
(Inherited from SettingsBase)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetValue(String, Type) Gets the application's configuration file setting converted to the given type.
(Inherited from SettingsBase)
Public methodGetValueT(String) Gets the application's configuration file setting converted to the given type.
(Inherited from SettingsBase)
Public methodGetValueT(String, T) Copies the specified application setting into the given value.
(Inherited from SettingsBase)
Protected methodInitialize Initializes configuration settings from derived class fields or properties.
(Inherited from SettingsBase)
Public methodLoad Loads configuration file into setting fields.
(Inherited from SettingsBase)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodPersistSettings Persist any pending changes to configuration file. This method is for internal use.
(Inherited from CategorizedSettingsBase)
Public methodRestoreDefaultSettings Restores the default settings of the configuration file.
(Inherited from SettingsBase)
Protected methodRetrieveSetting Retrieves setting from configuration file. This method is for internal use.
(Inherited from CategorizedSettingsBase)
Public methodSave Saves setting fields into configuration file.
(Inherited from SettingsBase)
Public methodSetValue Copies the given value into the specified application setting.
(Inherited from SettingsBase)
Protected methodStoreSetting Stores setting to configuration file. This method is for internal use.
(Inherited from CategorizedSettingsBase)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUpdateExpressions Refresh modeled value expressions from property values.
Public methodUpdateProperties Refresh property values from modeled value expressions.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
Consumer will need to call UpdateProperties method when modeled external sources are updated to ensure properties stay in-sync with external source.
See Also