|
CategorizedSettingsBaseTCategorizedSettings(ConfigurationFile, String, Boolean, Boolean, Boolean, TypeRegistry) Constructor
|
Namespace: GSF.ConfigurationAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax protected CategorizedSettingsBase(
ConfigurationFile configFile,
string categoryName,
bool useCategoryAttributes,
bool requireSerializeSettingAttribute,
bool initialize,
TypeRegistry typeRegistry = null
)
Protected Sub New (
configFile As ConfigurationFile,
categoryName As String,
useCategoryAttributes As Boolean,
requireSerializeSettingAttribute As Boolean,
initialize As Boolean,
Optional typeRegistry As TypeRegistry = Nothing
)
protected:
CategorizedSettingsBase(
ConfigurationFile^ configFile,
String^ categoryName,
bool useCategoryAttributes,
bool requireSerializeSettingAttribute,
bool initialize,
TypeRegistry^ typeRegistry = nullptr
)
new :
configFile : ConfigurationFile *
categoryName : string *
useCategoryAttributes : bool *
requireSerializeSettingAttribute : bool *
initialize : bool *
?typeRegistry : TypeRegistry
(* Defaults:
let _typeRegistry = defaultArg typeRegistry null
*)
-> CategorizedSettingsBase
GSF.Configuration.CategorizedSettingsBase = function(configFile, categoryName, useCategoryAttributes, requireSerializeSettingAttribute, initialize, typeRegistry);
View SourceParameters
- configFile ConfigurationFile
- Configuration file used for accessing settings.
- categoryName String
- Name of default category to use to get and set settings from configuration file.
- useCategoryAttributes Boolean
- Determines if category attributes will be used for category names.
- requireSerializeSettingAttribute Boolean
-
Assigns flag that determines if SerializeSettingAttribute is required
to exist before a field or property is serialized to the configuration file.
- initialize Boolean
- Determines if Initialize method should be called from constructor.
- typeRegistry TypeRegistry (Optional)
-
Type registry to use when parsing TypeConvertedValueExpressionAttribute instances, or null
to use DefaultTypeRegistry.
Remarks
If useCategoryAttributes is false, all settings will be placed in section labeled by the
categoryName value; otherwise, if a CategoryAttribute exists on a field or
property then the member value will serialized into the configuration file in a section labeled the same
as the Category value and if the attribute doesn't exist the member value
will serialized into the section labeled by the categoryName value.
Note that some .NET languages (e.g., Visual Basic) will not initialize member elements before call to constructor,
in this case initialize should be set to false, then the Initialize
method should be called manually after all properties have been initialized. Alternately, consider using the
DefaultValueAttribute on the fields or properties and this will be used to initialize the values.
See Also