Wiki > IniParser

BaseIniParser class


An abstract class that provides methods for creating or opening an .ini file. It also allows to add, edit and delete values from the file.

Namespace: RotaryHeart.Lib.IniParser
Assembly: UnityIniParser (in UnityIniParser.dll)

Syntax


public abstract class BaseIniParser

Inherited Classes


Properties


Accessibility Level Type Name Description
public abstract int Count Indicates how many keys have been stored.

Methods


Accessibility Level Returns Name Description
public abstract void Clear() Clears the instance data.
public abstract bool ContainsKey(string, string) Check if the parser contains the specified key in the specified sub section.
public abstract bool ContainsSubSection(string) Check if the parser contains the specified sub section.
public abstract KeyData Get(string, string) Gets the value with the specified key from the specified sub section.
public abstract string GetComment(string, string) Get the comment from the specified key and subsection.
public abstract string[] GetKeys(string) Returns all the keys stored inside a sub section.
public abstract string[] GetSubSections() Returns an array of all the sub sections on the file.
public abstract string GetValue(string, string) Get the value from the specified key and subsection.
public abstract string[] GetValues(string) Returns all the values stored inside a sub section.
public abstract bool Load(string) Loads the .ini file on the specified path.
public abstract bool Remove(string, string) Remove the specified key from the specified sub section. Returns removal success flag.
public abstract bool Remove(string, string, out KeyData) Remove the specified key from the specified sub section. Returns removal success flag.
public abstract void Save() Saves the file. Use this if a file has already been loaded.
public abstract void Save(string) Saves the data to the path specified.
public abstract void Set(string, KeyData) Sets or updates the value stored.
public abstract void Set(string, string, string, string = "") Sets or updates the value stored.
public abstract bool TryGet(string, string, out KeyData) Gets the value associated with the specified key and sub section.

The BaseIniParser class can only be used as a base class to implement any other custom ini parsing class. There is already two different parsing classes included DictionaryIniParser and ListIniParser.

See also