C# Class LoginServer.Systems.Ini

Inheritance: Profile
Afficher le fichier Open project: CarlosX/DarkEmu Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Retrieves a copy of itself.
public Clone ( ) : object
Résultat object

GetEntryNames() public méthode

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.
Résultat string[]

GetSectionNames() public méthode

Retrieves the names of all the sections.
public GetSectionNames ( ) : string[]
Résultat string[]

GetValue() public méthode

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.
Résultat object

Ini() public méthode

public Ini ( ) : System
Résultat System

Ini() public méthode

public Ini ( Ini ini ) : System
ini Ini
Résultat System

Ini() public méthode

public Ini ( string fileName ) : System
fileName string
Résultat System

RemoveEntry() public méthode

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.
Résultat void

RemoveSection() public méthode

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.
Résultat void

SetValue() public méthode

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.
Résultat void