C# Class AutoQuery.Systems.Ini

Inheritance: Profile
Show file Open project: CarlosX/RakionLauncher Class Usage Examples

Public Methods

Method Description
Clone ( ) : object

Retrieves a copy of itself.

GetEntryNames ( string section ) : string[]

Retrieves the names of all the entries inside a section.

GetSectionNames ( ) : string[]

Retrieves the names of all the sections.

GetValue ( string section, string entry ) : object

Retrieves the value of an entry inside a section.

Ini ( ) : System
Ini ( Ini ini ) : System
Ini ( string fileName ) : System
RemoveEntry ( string section, string entry ) : void

Removes an entry from a section.

The Profile.Changing event is raised before removing the entry. If its ProfileChangingArgs.Cancel property is set to true, this method returns immediately without removing the entry. After the entry has been removed, the Profile.Changed event is raised.

RemoveSection ( string section ) : void

Removes a section.

The Profile.Changing event is raised before removing the section. If its ProfileChangingArgs.Cancel property is set to true, this method returns immediately without removing the section. After the section has been removed, the Profile.Changed event is raised.

SetValue ( string section, string entry, object value ) : void

Sets the value for an entry inside a section.

If the INI file does not exist, it is created. The Profile.Changing event is raised before setting the value. If its ProfileChangingArgs.Cancel property is set to true, this method returns immediately without setting the value. After the value has been set, the Profile.Changed event is raised.

Private Methods

Method Description
GetPrivateProfileString ( int section, string key, string defaultValue, [ result, int size, string fileName ) : int
GetPrivateProfileString ( string section, int key, string defaultValue, [ result, int size, string fileName ) : int
GetPrivateProfileString ( string section, string key, string defaultValue, StringBuilder result, int size, string fileName ) : int
WritePrivateProfileString ( string section, int key, string value, string fileName ) : int
WritePrivateProfileString ( string section, string key, int value, string fileName ) : int
WritePrivateProfileString ( string section, string key, string value, string fileName ) : int

Method Details

Clone() public method

Retrieves a copy of itself.
public Clone ( ) : object
return object

GetEntryNames() public method

Retrieves the names of all the entries inside a section.
/// is null or empty.
public GetEntryNames ( string section ) : string[]
section string /// The name of the section holding the entries.
return string[]

GetSectionNames() public method

Retrieves the names of all the sections.
public GetSectionNames ( ) : string[]
return string[]

GetValue() public method

Retrieves the value of an entry inside a section.
/// is null or empty. /// Either section or entry is null.
public GetValue ( string section, string entry ) : object
section string /// The name of the section that holds the entry with the value.
entry string /// The name of the entry where the value is stored.
return object

Ini() public method

public Ini ( ) : System
return System

Ini() public method

public Ini ( Ini ini ) : System
ini Ini
return System

Ini() public method

public Ini ( string fileName ) : System
fileName string
return System

RemoveEntry() public method

Removes an entry from a section.
The Profile.Changing event is raised before removing the entry. If its ProfileChangingArgs.Cancel property is set to true, this method returns immediately without removing the entry. After the entry has been removed, the Profile.Changed event is raised.
/// is null or empty or /// is true. /// Either section or entry is null. /// The API failed.
public RemoveEntry ( string section, string entry ) : void
section string /// The name of the section that holds the entry.
entry string /// The name of the entry to remove.
return void

RemoveSection() public method

Removes a section.
The Profile.Changing event is raised before removing the section. If its ProfileChangingArgs.Cancel property is set to true, this method returns immediately without removing the section. After the section has been removed, the Profile.Changed event is raised.
/// is null or empty or /// is true. /// section is null. /// The API failed.
public RemoveSection ( string section ) : void
section string /// The name of the section to remove.
return void

SetValue() public method

Sets the value for an entry inside a section.
If the INI file does not exist, it is created. The Profile.Changing event is raised before setting the value. If its ProfileChangingArgs.Cancel property is set to true, this method returns immediately without setting the value. After the value has been set, the Profile.Changed event is raised.
/// is true or /// is null or empty. /// Either section or entry is null. /// The API failed.
public SetValue ( string section, string entry, object value ) : void
section string /// The name of the section that holds the entry.
entry string /// The name of the entry where the value will be set.
value object /// The value to set. If it's null, the entry is removed.
return void