C# Class IniParser, Castle-Bashers

Afficher le fichier Open project: DevelopersGuild/Castle-Bashers Class Usage Examples

Méthodes publiques

Méthode Description
AddSetting ( String sectionName, String settingName ) : void

Adds or replaces a setting to the table to be saved with a null value.

AddSetting ( String sectionName, String settingName, String settingValue ) : void

Adds or replaces a setting to the table to be saved.

DeleteSetting ( String sectionName, String settingName ) : void

Remove a setting.

EnumSection ( String sectionName ) : String[]

Enumerates all lines for given section.

GetSetting ( String sectionName, String settingName ) : String

Returns the value for the given section, key pair.

IniParser ( String iniPath ) : System

Opens the INI file at the given path and enumerates the values in the IniParser.

SaveSettings ( ) : void

Save settings back to ini file.

SaveSettings ( String newFilePath ) : void

Save settings to new file.

Method Details

AddSetting() public méthode

Adds or replaces a setting to the table to be saved with a null value.
public AddSetting ( String sectionName, String settingName ) : void
sectionName String Section to add under.
settingName String Key name to add.
Résultat void

AddSetting() public méthode

Adds or replaces a setting to the table to be saved.
public AddSetting ( String sectionName, String settingName, String settingValue ) : void
sectionName String Section to add under.
settingName String Key name to add.
settingValue String Value of key.
Résultat void

DeleteSetting() public méthode

Remove a setting.
public DeleteSetting ( String sectionName, String settingName ) : void
sectionName String Section to add under.
settingName String Key name to add.
Résultat void

EnumSection() public méthode

Enumerates all lines for given section.
public EnumSection ( String sectionName ) : String[]
sectionName String Section to enum.
Résultat String[]

GetSetting() public méthode

Returns the value for the given section, key pair.
public GetSetting ( String sectionName, String settingName ) : String
sectionName String Section name.
settingName String Key name.
Résultat String

IniParser() public méthode

Opens the INI file at the given path and enumerates the values in the IniParser.
public IniParser ( String iniPath ) : System
iniPath String Full path to INI file.
Résultat System

SaveSettings() public méthode

Save settings back to ini file.
public SaveSettings ( ) : void
Résultat void

SaveSettings() public méthode

Save settings to new file.
public SaveSettings ( String newFilePath ) : void
newFilePath String New file path.
Résultat void