Click or drag to resize

IniSettingsBase(IniFile, String, Boolean, Boolean, Boolean) Constructor

Creates a new instance of the IniSettingsBase class for the application's INI file.

Namespace: GSF.Configuration
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
protected IniSettingsBase(
	IniFile iniFile,
	string sectionName,
	bool useCategoryAttributes,
	bool requireSerializeSettingAttribute,
	bool initialize
)
View Source

Parameters

iniFile  IniFile
INI file to use for accessing settings.
sectionName  String
Name of default section to use to get and set settings from INI file.
useCategoryAttributes  Boolean
Determines if category attributes will be used for section names.
requireSerializeSettingAttribute  Boolean
Assigns flag that determines if SerializeSettingAttribute is required to exist before a field or property is serialized to the INI file.
initialize  Boolean
Determines if Initialize method should be called from constructor.
Remarks

If useCategoryAttributes is false, all settings will be placed in section labeled by the sectionName value; otherwise, if a CategoryAttribute exists on a field or property then the member value will serialized into the INI 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 sectionName value.

Note that some .NET languages (e.g., Visual Basic) will not initialize member elements before call to constuctor, 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