C# Класс AutoQuery.Systems.Ini

Наследование: Profile
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Clone() публичный Метод

Retrieves a copy of itself.
public Clone ( ) : object
Результат object

GetEntryNames() публичный Метод

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.
Результат string[]

GetSectionNames() публичный Метод

Retrieves the names of all the sections.
public GetSectionNames ( ) : string[]
Результат string[]

GetValue() публичный Метод

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.
Результат object

Ini() публичный Метод

public Ini ( ) : System
Результат System

Ini() публичный Метод

public Ini ( Ini ini ) : System
ini Ini
Результат System

Ini() публичный Метод

public Ini ( string fileName ) : System
fileName string
Результат System

RemoveEntry() публичный Метод

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.
Результат void

RemoveSection() публичный Метод

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.
Результат void

SetValue() публичный Метод

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.
Результат void