Wiki > IniParser

DictionaryIniParser class


An .ini file parser that uses a dictionary for faster results.

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

Syntax


public class DictionaryIniParser : BaseIniParser

Classes


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

Constructors


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

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 DictionarySubSection 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 DictionarySubSection) Get the value associated with the specified sub section.

The DictionaryIniParser class should be used when trying to get faster search parameters.

See also