C# Class mINI.INIReader

Exibir arquivo Open project: Beluki/Yava

Public Methods

Method Description
ReadLine ( String line ) : void

Read an INI line.

Protected Methods

Method 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

Method 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 method

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

OnEmpty() protected method

Called when the current line is empty.
protected OnEmpty ( ) : void
return void

OnKeyEmpty() protected method

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.
return void

OnKeyValue() protected method

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.
return void

OnSection() protected method

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". ///
return void

OnSectionEmpty() protected method

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

OnSubSection() protected method

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.
return void

OnSubSectionEmpty() protected method

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.
return void

OnUnknown() protected method

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

OnValueEmpty() protected method

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.
return void

ReadLine() public method

Read an INI line.
public ReadLine ( String line ) : void
line String Input line.
return void