C# Class iniParser, Unity_tools

An .ini file parser that Creates and edits .ini files, With functions to fetch and delete values.
Afficher le fichier Open project: kennyist/Unity_tools Class Usage Examples

Méthodes publiques

Méthode Description
Clear ( ) : void

Clear this instance.

Count ( ) : int

How many keys are stored.

DoesExist ( IniFiles, file ) : bool

Returns true if the file exists, or false if it doesnt.

Get ( string key ) : string

Returns the value for the input variable.

Get ( string subSection, string key ) : string

Get the specified key from a subSection. For use if you need to use the same name in differant sections.

GetLine ( string key ) : string[]

Returns the Key, Value, subsection and comment of the choosen variable.

Load ( IniFiles, file ) : void

Load the specified file.

Remove ( string key ) : void

Removes the selected Variable including its value and comment.

Remove ( string subSection, string key ) : void

Remove the specified key from the specified subSection.

Save ( IniFiles, file ) : void

Save the specified file.

Set ( string subSection, string key, string value ) : void

Set the variable and value if they dont exist. Updates the variables value if does exist.

Set ( string subSection, string key, string value, string comment ) : void

Set the variable and value if they dont exist including a comment. Updates the variables value and comment if does exist.

iniParser ( ) : System.Collections.Generic

Initializes a new instance of the iniParser class without loading a file.

iniParser ( IniFiles, file ) : System.Collections.Generic

Initializes a new instance of the iniParser class with loading a file.

Method Details

Clear() public méthode

Clear this instance.
public Clear ( ) : void
Résultat void

Count() public méthode

How many keys are stored.
public Count ( ) : int
Résultat int

DoesExist() public méthode

Returns true if the file exists, or false if it doesnt.
public DoesExist ( IniFiles, file ) : bool
file IniFiles, The selected file.
Résultat bool

Get() public méthode

Returns the value for the input variable.
public Get ( string key ) : string
key string The variable name.
Résultat string

Get() public méthode

Get the specified key from a subSection. For use if you need to use the same name in differant sections.
public Get ( string subSection, string key ) : string
subSection string Sub section.
key string Key.
Résultat string

GetLine() public méthode

Returns the Key, Value, subsection and comment of the choosen variable.
public GetLine ( string key ) : string[]
key string The variable name.
Résultat string[]

Load() public méthode

Load the specified file.
public Load ( IniFiles, file ) : void
file IniFiles, The file name.
Résultat void

Remove() public méthode

Removes the selected Variable including its value and comment.
public Remove ( string key ) : void
key string The variable name.
Résultat void

Remove() public méthode

Remove the specified key from the specified subSection.
public Remove ( string subSection, string key ) : void
subSection string Sub section name.
key string The key name
Résultat void

Save() public méthode

Save the specified file.
public Save ( IniFiles, file ) : void
file IniFiles, The file name.
Résultat void

Set() public méthode

Set the variable and value if they dont exist. Updates the variables value if does exist.
public Set ( string subSection, string key, string value ) : void
subSection string The Section this key belongs to
key string The variable nameThe value of the variable
value string
Résultat void

Set() public méthode

Set the variable and value if they dont exist including a comment. Updates the variables value and comment if does exist.
public Set ( string subSection, string key, string value, string comment ) : void
subSection string The Section this key belongs to
key string The variable name
value string
comment string The comment of the variable
Résultat void

iniParser() public méthode

Initializes a new instance of the iniParser class without loading a file.
public iniParser ( ) : System.Collections.Generic
Résultat System.Collections.Generic

iniParser() public méthode

Initializes a new instance of the iniParser class with loading a file.
public iniParser ( IniFiles, file ) : System.Collections.Generic
file IniFiles, Name of the file you want to load.
Résultat System.Collections.Generic