C# Class mINI.INIReader

Afficher le fichier Open project: Beluki/Yava

Méthodes publiques

Méthode Description
ReadLine ( String line ) : void

Read an INI line.

Méthodes protégées

Méthode Description
OnComment ( String text ) : void

Called when the current line is a comment.

OnEmpty ( ) : void

Called when the current line is empty.

OnKeyEmpty ( String value ) : void

Called when the key is empty in a key=value pair. This method is called before calling OnKeyValue.

OnKeyValue ( String key, String value ) : void

Called when the current line is a key=value pair.

OnSection ( String section ) : void

Called when the current line is a section, before reading subsections.

OnSectionEmpty ( ) : void

Called when a section name is empty, not including subsections. This method is called before calling OnSection.

OnSubSection ( String subsection, String path ) : void

Called each time a subsection is found in a section line.

Example: for a line such as: [a/b/c], this method is called 3 times with the following arguments:

OnSubSection("a", "a")

OnSubSection("b", "a/b")

OnSubSection("c", "a/b/c")

OnSubSectionEmpty ( String path ) : void

Called when a subsection name is empty. This method is called before calling OnSubSection.

OnUnknown ( String line ) : void

Called when the reader is unable to read the current line.

OnValueEmpty ( String key ) : void

Called when the value is empty in a key=value pair. This method is called before calling OnKeyValue.

Private Methods

Méthode Description
ReadComment ( String line ) : System.Boolean

Try to read a comment.

ReadEmpty ( String line ) : System.Boolean

Try to read an empty line.

ReadKeyValue ( String line ) : System.Boolean

Try to read a key=value pair.

ReadSection ( String line ) : System.Boolean

Try to read a (possibly nested) section.

ReadSubSections ( String section ) : void

Read subsections in a given section.

Method Details

OnComment() protected méthode

Called when the current line is a comment.
protected OnComment ( String text ) : void
text String Comment text, prefix (; or #) included.
Résultat void

OnEmpty() protected méthode

Called when the current line is empty.
protected OnEmpty ( ) : void
Résultat void

OnKeyEmpty() protected méthode

Called when the key is empty in a key=value pair. This method is called before calling OnKeyValue.
protected OnKeyEmpty ( String value ) : void
value String Value associated with the key.
Résultat void

OnKeyValue() protected méthode

Called when the current line is a key=value pair.
protected OnKeyValue ( String key, String value ) : void
key String Key.
value String Value associated with the key.
Résultat void

OnSection() protected méthode

Called when the current line is a section, before reading subsections.
protected OnSection ( String section ) : void
section String /// Complete section name, regardless of subsections /// and inner whitespace. Example: "a/b /c/ d". ///
Résultat void

OnSectionEmpty() protected méthode

Called when a section name is empty, not including subsections. This method is called before calling OnSection.
protected OnSectionEmpty ( ) : void
Résultat void

OnSubSection() protected méthode

Called each time a subsection is found in a section line.

Example: for a line such as: [a/b/c], this method is called 3 times with the following arguments:

OnSubSection("a", "a")

OnSubSection("b", "a/b")

OnSubSection("c", "a/b/c")

protected OnSubSection ( String subsection, String path ) : void
subsection String Subsection name.
path String Subsection path, including parents.
Résultat void

OnSubSectionEmpty() protected méthode

Called when a subsection name is empty. This method is called before calling OnSubSection.
protected OnSubSectionEmpty ( String path ) : void
path String Subsection path, including parents.
Résultat void

OnUnknown() protected méthode

Called when the reader is unable to read the current line.
protected OnUnknown ( String line ) : void
line String Complete input line, not trimmed.
Résultat void

OnValueEmpty() protected méthode

Called when the value is empty in a key=value pair. This method is called before calling OnKeyValue.
protected OnValueEmpty ( String key ) : void
key String Key specified for the value.
Résultat void

ReadLine() public méthode

Read an INI line.
public ReadLine ( String line ) : void
line String Input line.
Résultat void