C# Class Knot3.Framework.Storage.ConfigFile

Repräsentiert eine Einstellungsdatei.
Datei anzeigen Open project: knot3/knot3-code Class Usage Examples

Public Methods

Method Description
ConfigFile ( string filename ) : System
GetOption ( string section, string option, bool defaultValue ) : bool

Gibt den aktuell in der Datei vorhandenen Wert für die angegebene Option in dem angegebenen Abschnitt zurück.

GetOption ( string section, string option, float defaultValue ) : float
GetOption ( string section, string option, string defaultValue ) : string

Gibt den aktuell in der Datei vorhandenen Wert für die angegebene Option in dem angegebenen Abschnitt zurück.

SetOption ( string section, string option, bool _value ) : void

Setzt den Wert der Option mit dem angegebenen Namen in den angegebenen Abschnitt auf den angegebenen Wert.

SetOption ( string section, string option, float _value ) : void
SetOption ( string section, string option, string _value ) : void

Setzt den Wert der Option mit dem angegebenen Namen in den angegebenen Abschnitt auf den angegebenen Wert.

this ( string section, string option, bool defaultValue = false ) : bool
this ( string section, string option, float defaultValue = 0f ) : float
this ( string section, string option, string defaultValue = null ) : string

Private Methods

Method Description
floatToString ( float f ) : string
stringToFloat ( string s ) : float

Method Details

ConfigFile() public method

public ConfigFile ( string filename ) : System
filename string
return System

GetOption() public method

Gibt den aktuell in der Datei vorhandenen Wert für die angegebene Option in dem angegebenen Abschnitt zurück.
public GetOption ( string section, string option, bool defaultValue ) : bool
section string
option string
defaultValue bool
return bool

GetOption() public method

public GetOption ( string section, string option, float defaultValue ) : float
section string
option string
defaultValue float
return float

GetOption() public method

Gibt den aktuell in der Datei vorhandenen Wert für die angegebene Option in dem angegebenen Abschnitt zurück.
public GetOption ( string section, string option, string defaultValue ) : string
section string
option string
defaultValue string
return string

SetOption() public method

Setzt den Wert der Option mit dem angegebenen Namen in den angegebenen Abschnitt auf den angegebenen Wert.
public SetOption ( string section, string option, bool _value ) : void
section string
option string
_value bool
return void

SetOption() public method

public SetOption ( string section, string option, float _value ) : void
section string
option string
_value float
return void

SetOption() public method

Setzt den Wert der Option mit dem angegebenen Namen in den angegebenen Abschnitt auf den angegebenen Wert.
public SetOption ( string section, string option, string _value ) : void
section string
option string
_value string
return void

this() public method

public this ( string section, string option, bool defaultValue = false ) : bool
section string
option string
defaultValue bool
return bool

this() public method

public this ( string section, string option, float defaultValue = 0f ) : float
section string
option string
defaultValue float
return float

this() public method

public this ( string section, string option, string defaultValue = null ) : string
section string
option string
defaultValue string
return string