C# 클래스 ClientLauncher.IniFiles

Provides methods for reading and writing to an INI file.
파일 보기 프로젝트 열기: swganhtools/swganhclientlauncher 1 사용 예제들

공개 메소드들

메소드 설명
AddDuplicateKey ( string strSectionName, string strKeyName, string strKeyValue ) : void
DeleteKey ( string sectionName, string keyName ) : void

Deletes the specified key from the specified section.

DeleteSection ( string sectionName ) : void

Deletes a section from the ini file.

GetDouble ( string sectionName, string keyName, double defaultValue ) : double

Gets the value of a setting in an ini file as a T:System.Double.

GetInt16 ( string sectionName, string keyName, short defaultValue ) : int

Gets the value of a setting in an ini file as a T:System.Int16.

GetInt32 ( string sectionName, string keyName, int defaultValue ) : int

Gets the value of a setting in an ini file as a T:System.Int32.

GetKeyNames ( string sectionName ) : string[]

Gets the names of all keys under a specific section in the ini file.

The total length of all key names in the section must be less than 32KB in length.

GetSectionNames ( ) : string[]

Gets the names of all sections in the ini file.

The total length of all section names in the section must be less than 32KB in length.

GetSectionValues ( string sectionName ) : string>.Dictionary

Gets all of the values in a section as a dictionary.

If a section contains more than one key with the same name, this function only returns the first instance. If you need to get all key/value pairs within a section even when keys have the same name, use GetSectionValuesAsList.

GetSectionValuesAsList ( string sectionName ) : string>>.List

Gets all of the values in a section as a list.

GetString ( string sectionName, string keyName, string defaultValue ) : string

Gets the value of a setting in an ini file as a T:System.String.

The retreived value must be less than 32KB in length.

IniFiles ( string path ) : System

Initializes a new instance of the IniFile class.

WriteValue ( string sectionName, string keyName, double value ) : void

Writes an T:System.Double value to the ini file.

WriteValue ( string sectionName, string keyName, float value ) : void

Writes an T:System.Single value to the ini file.

WriteValue ( string sectionName, string keyName, int value ) : void

Writes an T:System.Int32 value to the ini file.

WriteValue ( string sectionName, string keyName, short value ) : void

Writes an T:System.Int16 value to the ini file.

WriteValue ( string sectionName, string keyName, string value ) : void

Writes a T:System.String value to the ini file.

비공개 메소드들

메소드 설명
ConvertNullSeperatedStringToStringArray ( IntPtr ptr, int valLength ) : string[]

Converts the null seperated pointer to a string into a string array.

WriteValueInternal ( string sectionName, string keyName, string value ) : void

Writes a T:System.String value to the ini file.

메소드 상세

AddDuplicateKey() 공개 메소드

public AddDuplicateKey ( string strSectionName, string strKeyName, string strKeyValue ) : void
strSectionName string
strKeyName string
strKeyValue string
리턴 void

DeleteKey() 공개 메소드

Deletes the specified key from the specified section.
/// or are /// a null reference (Nothing in VB) ///
public DeleteKey ( string sectionName, string keyName ) : void
sectionName string /// Name of the section to remove the key from. ///
keyName string /// Name of the key to remove. ///
리턴 void

DeleteSection() 공개 메소드

Deletes a section from the ini file.
/// is a null reference (Nothing in VB) ///
public DeleteSection ( string sectionName ) : void
sectionName string /// Name of the section to delete. ///
리턴 void

GetDouble() 공개 메소드

Gets the value of a setting in an ini file as a T:System.Double.
/// or are /// a null reference (Nothing in VB) ///
public GetDouble ( string sectionName, string keyName, double defaultValue ) : double
sectionName string The name of the section to read from.
keyName string The name of the key in section to read.
defaultValue double The default value to return if the key /// cannot be found.
리턴 double

GetInt16() 공개 메소드

Gets the value of a setting in an ini file as a T:System.Int16.
/// or are /// a null reference (Nothing in VB) ///
public GetInt16 ( string sectionName, string keyName, short defaultValue ) : int
sectionName string The name of the section to read from.
keyName string The name of the key in section to read.
defaultValue short The default value to return if the key /// cannot be found.
리턴 int

GetInt32() 공개 메소드

Gets the value of a setting in an ini file as a T:System.Int32.
/// or are /// a null reference (Nothing in VB) ///
public GetInt32 ( string sectionName, string keyName, int defaultValue ) : int
sectionName string The name of the section to read from.
keyName string The name of the key in section to read.
defaultValue int The default value to return if the key /// cannot be found.
리턴 int

GetKeyNames() 공개 메소드

Gets the names of all keys under a specific section in the ini file.
The total length of all key names in the section must be less than 32KB in length.
/// is a null reference (Nothing in VB) ///
public GetKeyNames ( string sectionName ) : string[]
sectionName string /// The name of the section to read key names from. ///
리턴 string[]

GetSectionNames() 공개 메소드

Gets the names of all sections in the ini file.
The total length of all section names in the section must be less than 32KB in length.
public GetSectionNames ( ) : string[]
리턴 string[]

GetSectionValues() 공개 메소드

Gets all of the values in a section as a dictionary.
If a section contains more than one key with the same name, this function only returns the first instance. If you need to get all key/value pairs within a section even when keys have the same name, use GetSectionValuesAsList.
/// is a null reference (Nothing in VB) ///
public GetSectionValues ( string sectionName ) : string>.Dictionary
sectionName string /// Name of the section to retrieve values from. ///
리턴 string>.Dictionary

GetSectionValuesAsList() 공개 메소드

Gets all of the values in a section as a list.
/// is a null reference (Nothing in VB) ///
public GetSectionValuesAsList ( string sectionName ) : string>>.List
sectionName string /// Name of the section to retrieve values from. ///
리턴 string>>.List

GetString() 공개 메소드

Gets the value of a setting in an ini file as a T:System.String.
The retreived value must be less than 32KB in length.
/// or are /// a null reference (Nothing in VB) ///
public GetString ( string sectionName, string keyName, string defaultValue ) : string
sectionName string The name of the section to read from.
keyName string The name of the key in section to read.
defaultValue string The default value to return if the key /// cannot be found.
리턴 string

IniFiles() 공개 메소드

Initializes a new instance of the IniFile class.
public IniFiles ( string path ) : System
path string The ini file to read and write from.
리턴 System

WriteValue() 공개 메소드

Writes an T:System.Double value to the ini file.
/// The write failed. /// /// or are /// a null reference (Nothing in VB) ///
public WriteValue ( string sectionName, string keyName, double value ) : void
sectionName string The name of the section to write to .
keyName string The name of the key to write to.
value double The value to write
리턴 void

WriteValue() 공개 메소드

Writes an T:System.Single value to the ini file.
/// The write failed. /// /// or are /// a null reference (Nothing in VB) ///
public WriteValue ( string sectionName, string keyName, float value ) : void
sectionName string The name of the section to write to .
keyName string The name of the key to write to.
value float The value to write
리턴 void

WriteValue() 공개 메소드

Writes an T:System.Int32 value to the ini file.
/// The write failed. /// /// or are /// a null reference (Nothing in VB) ///
public WriteValue ( string sectionName, string keyName, int value ) : void
sectionName string The name of the section to write to .
keyName string The name of the key to write to.
value int The value to write
리턴 void

WriteValue() 공개 메소드

Writes an T:System.Int16 value to the ini file.
/// The write failed. ///
public WriteValue ( string sectionName, string keyName, short value ) : void
sectionName string The name of the section to write to .
keyName string The name of the key to write to.
value short The value to write
리턴 void

WriteValue() 공개 메소드

Writes a T:System.String value to the ini file.
/// The write failed. /// /// or or /// are a null reference (Nothing in VB) ///
public WriteValue ( string sectionName, string keyName, string value ) : void
sectionName string The name of the section to write to .
keyName string The name of the key to write to.
value string The string value to write
리턴 void