Table of Contents

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

char

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 string

Full 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

TEnum Type

Some enum type.

propertyStr string

A name defined by TEnum, or a number.

Returns

object

For example, if TEnum is Win32.MsgBox, the result is OK when propertyStr is "Ok" or "0".

Exceptions

ArgumentException

Thrown if propertyStr is not a value of TEnum.

Save(string)

Dumps all writable properties of this ISettingsManager to the INI file at filePath.

public virtual void Save(string filePath = null)

Parameters

filePath string

Full file path of an INI file.