Class DefaultSettings
- Namespace
- Npp.DotNet.Plugin.Extensions
- Assembly
- Npp.DotNet.Plugin.dll
Default implementation of the ISettingsManager interface.
public class DefaultSettings : ISettingsManager
- Inheritance
-
DefaultSettings
- Implements
- Inherited Members
Fields
KeyValueSeparator
Token used to separate property keys from values.
public char KeyValueSeparator
Field Value
Methods
Load(string)
Sets all writable properties of this ISettingsManager from the values in the INI file at filePath
.
public virtual void Load(string filePath = null)
Parameters
filePath
stringFull file path of an INI file.
OpenFile()
Opens the INI file of this ISettingsManager.
public virtual void OpenFile()
Remarks
Deriving classes must implement this method for themselves.
ParseEnumProperty(Type, string)
Parses a named enum value, ignoring case, or the underlying numeric value.
protected static object ParseEnumProperty(Type TEnum, string propertyStr)
Parameters
Returns
- object
For example, if
TEnum
is Win32.MsgBox, the result is OK whenpropertyStr
is"Ok"
or"0"
.
Exceptions
- ArgumentException
Thrown if
propertyStr
is not a value ofTEnum
.
Save(string)
Dumps all writable properties of this ISettingsManager to the INI file at filePath
.
public virtual void Save(string filePath = null)
Parameters
filePath
stringFull file path of an INI file.