C# Class Yava.FoldersFile.FoldersFileReader

Inheritance: mINI.INIReader
Afficher le fichier Open project: Beluki/Yava Class Usage Examples

Méthodes publiques

Méthode Description
FoldersFileReader ( ) : System

An INIReader that reads lines from a folders file adding sections and key=value pairs to a collection as folder names/options.

Read ( String filepath, IList folders ) : void

Read a folders file adding each folder with its options to a collection.

Méthodes protégées

Méthode Description
OnEmpty ( ) : void

On an empty line, add the current folder to the collection and move on to the next one.

OnKeyEmpty ( String value ) : void

Do not accept options with no name.

OnKeyValue ( String key, String value ) : void

Set key=value pairs as options to the current folder.

OnSection ( String section ) : void

On a new section, add the current folder to the collection and create the next one.

OnSectionEmpty ( ) : void

Do not accept folders with no name.

OnUnknown ( String line ) : void

Syntax errors.

OnValueEmpty ( String key ) : void

Options without value are fine. (each option validates its own value in OnKeyValue)

Private Methods

Méthode Description
AddCurrentFolder ( ) : void

Add the current folder to the list and move on to the next.

ReadError ( String message ) : FoldersFileReadError

Concise helper to create FoldersFileReadError exceptions.

ReadFolderExecutable ( String value ) : String

Try to parse a folder executable option.

ReadFolderExtensions ( String value ) : HashSet

Try to parse a folder extensions option.

ReadFolderParameters ( String value ) : String

Try to parse folder parameters option.

ReadFolderPath ( String value ) : String

Try to parse a folder path option.

ReadFolderWorkingDirectory ( String value ) : String

Try to parse folder workingdirectory option.

ResetState ( ) : void

Clear internal state.

Method Details

FoldersFileReader() public méthode

An INIReader that reads lines from a folders file adding sections and key=value pairs to a collection as folder names/options.
public FoldersFileReader ( ) : System
Résultat System

OnEmpty() protected méthode

On an empty line, add the current folder to the collection and move on to the next one.
protected OnEmpty ( ) : void
Résultat void

OnKeyEmpty() protected méthode

Do not accept options with no name.
protected OnKeyEmpty ( String value ) : void
value String
Résultat void

OnKeyValue() protected méthode

Set key=value pairs as options to the current folder.
protected OnKeyValue ( String key, String value ) : void
key String
value String
Résultat void

OnSection() protected méthode

On a new section, add the current folder to the collection and create the next one.
protected OnSection ( String section ) : void
section String
Résultat void

OnSectionEmpty() protected méthode

Do not accept folders with no name.
protected OnSectionEmpty ( ) : void
Résultat void

OnUnknown() protected méthode

Syntax errors.
protected OnUnknown ( String line ) : void
line String
Résultat void

OnValueEmpty() protected méthode

Options without value are fine. (each option validates its own value in OnKeyValue)
protected OnValueEmpty ( String key ) : void
key String
Résultat void

Read() public méthode

Read a folders file adding each folder with its options to a collection.
public Read ( String filepath, IList folders ) : void
filepath String Path to the file to read lines from.
folders IList Target list to add folders to.
Résultat void