Wiki > IniParser

ListIniParser class


An .ini file parser that uses Lists. This should be used when a data needs to be loaded on the order that is written.

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

Syntax


public class ListIniParser : BaseIniParser

Constructors


Accessibility Level Name Description
public ListIniParser() New instance without loading any file.
public ListIniParser(string) Creates an instance and loads a file on the specified path.

Classes


Accessibility Level Name Description
public ListSubSection Class that holds the sub sections that are used by the List parsing method. This is a nested class since it shouldn't be used outside of its parent ListIniParser.

Properties


Accessibility Level Type Name Description
public override int Count How many elements does the system has loaded.

Methods


Accessibility Level Type Name Description
public override void Clear() Clears the instance data.
public override bool ContainsKey(string) Check if the parser contains the specified key in the specified sub section.
public override bool ContainsSubSection(string) Check if the parser contains the specified sub section.
public override string[] GetKeys(string) Returns all the keys stored inside a sub section.
public ListSubSection GetSubSection(string) Get the entire sub section.
public override string[] GetSubSections() Returns an array of all the sub sections on the file.
public override string[] GetValues(string) Returns all the values stored inside a sub section.
public override bool Remove(string, string, out KeyData) Remove the specified key from the specified sub section. Returns removal success flag.
public bool RemoveSubSection(string) Removes the specified sub section.
public bool RemoveSubSection(string, out ListSubSection) Removes the specified sub section.
public override void Save(string) Saves the data to the path specified.
public override void Set(string, KeyData) Sets or updates the value stored.
public override bool TryGet(string, string, out KeyData) Gets the value associated with the specified key and sub section.
public bool TryGetSubSection(string, out ListSubSection) Get the entire sub section.

The ListIniParser class should be used when trying to get information in the same order that is written in the file.

See also