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
filePathstringFull 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
TEnumis Win32.MsgBox, the result is OK whenpropertyStris"Ok"or"0".
Exceptions
- ArgumentException
Thrown if
propertyStris 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
filePathstringFull file path of an INI file.