ATCFS For OpenBVE
 全て クラス 名前空間 ファイル 関数 変数 プロパティ ページ
公開メンバ関数 | プロパティ | 非公開メンバ関数 | 非公開変数類 | 全メンバ一覧
IniParser.Model.IniData クラス

Represents all data from an INI file [詳解]

IniParser.Model.IniData の継承関係図
Inheritance graph
[凡例]
IniParser.Model.IniData 連携図
Collaboration graph
[凡例]

公開メンバ関数

 IniData ()
 Initializes an empty IniData instance. [詳解]
 
 IniData (SectionDataCollection sdc)
 Initializes a new IniData instance using a previous SectionDataCollection. [詳解]
 
 IniData (IniData ori)
 
override string ToString ()
 
virtual string ToString (IIniDataFormatter formatter)
 
object Clone ()
 Creates a new object that is a copy of the current instance. [詳解]
 
void ClearAllComments ()
 Deletes all comments in all sections and key values [詳解]
 
void Merge (IniData toMergeIniData)
 Merges the other iniData into this one by overwriting existing values. Comments get appended. [詳解]
 
bool TryGetKey (string key, out string value)
 Attempts to retrieve a key, using a single string combining section and key name. [詳解]
 
string GetKey (string key)
 Retrieves a key using a single input string combining section and key name. [詳解]
 

プロパティ

IniParserConfiguration Configuration [get, set]
 Configuration used to write an ini file with the proper delimiter characters and data. [詳解]
 
KeyDataCollection Global [get, set]
 Global sections. Contains key/value pairs which are not enclosed in any section (i.e. they are defined at the beginning of the file, before any section. [詳解]
 
KeyDataCollection this[string sectionName] [get]
 Gets the KeyDataCollection instance with the specified section name. [詳解]
 
SectionDataCollection Sections [get, set]
 Gets or sets all the SectionData for this IniData instance. [詳解]
 
char SectionKeySeparator [get, set]
 Used to mark the separation between the section name and the key name when using IniData.TryGetKey. [詳解]
 

非公開メンバ関数

void MergeSection (SectionData otherSection)
 Merge the sections into this by overwriting this sections. [詳解]
 
void MergeGlobal (KeyDataCollection globals)
 Merges the given global values into this globals by overwriting existing values. [詳解]
 

非公開変数類

SectionDataCollection _sections
 Represents all sections from an INI file [詳解]
 
IniParserConfiguration _configuration
 See property Configuration for more information. [詳解]
 

詳解

Represents all data from an INI file

構築子と解体子

IniParser.Model.IniData.IniData ( )

Initializes an empty IniData instance.

IniParser.Model.IniData.IniData ( SectionDataCollection  sdc)

Initializes a new IniData instance using a previous SectionDataCollection.

引数
sdcSectionDataCollection object containing the data with the sections of the file

呼び出し関係図:

IniParser.Model.IniData.IniData ( IniData  ori)

呼び出し関係図:

メソッド詳解

void IniParser.Model.IniData.ClearAllComments ( )

Deletes all comments in all sections and key values

object IniParser.Model.IniData.Clone ( )

Creates a new object that is a copy of the current instance.

戻り値
A new object that is a copy of this instance.
string IniParser.Model.IniData.GetKey ( string  key)

Retrieves a key using a single input string combining section and key name.

引数
keyThe section and key name to retrieve, separated by IniParserConfiguration.SectionKeySeparator.

If key contains no separator, it is treated as a key in the Global section.

Key may contain no more than one separator character.

戻り値
The key's value if it was found, otherwise null.
例外
ArgumentExceptionkey contained multiple separators.
void IniParser.Model.IniData.Merge ( IniData  toMergeIniData)

Merges the other iniData into this one by overwriting existing values. Comments get appended.

引数
toMergeIniDataIniData instance to merge into this. If it is null this operation does nothing.
void IniParser.Model.IniData.MergeGlobal ( KeyDataCollection  globals)
private

Merges the given global values into this globals by overwriting existing values.

void IniParser.Model.IniData.MergeSection ( SectionData  otherSection)
private

Merge the sections into this by overwriting this sections.

override string IniParser.Model.IniData.ToString ( )
virtual string IniParser.Model.IniData.ToString ( IIniDataFormatter  formatter)
virtual
bool IniParser.Model.IniData.TryGetKey ( string  key,
out string  value 
)

Attempts to retrieve a key, using a single string combining section and key name.

引数
keyThe section and key name to retrieve, separated by IniParserConfiguration.SectionKeySeparator.

If key contains no separator, it is treated as a key in the Global section.

Key may contain no more than one separator character.

引数
valueIf true is returned, is set to the value retrieved. Otherwise, is set to an empty string.
戻り値
True if key was found, otherwise false.
例外
ArgumentExceptionkey contained multiple separators.

メンバ詳解

IniParserConfiguration IniParser.Model.IniData._configuration
private

See property Configuration for more information.

SectionDataCollection IniParser.Model.IniData._sections
private

Represents all sections from an INI file

プロパティ詳解

IniParserConfiguration IniParser.Model.IniData.Configuration
getset

Configuration used to write an ini file with the proper delimiter characters and data.

If the IniData instance was created by a parser, this instance is a copy of the IniParserConfiguration used by the parser (i.e. different objects instances) If this instance is created programatically without using a parser, this property returns an instance of IniParserConfiguration

KeyDataCollection IniParser.Model.IniData.Global
getset

Global sections. Contains key/value pairs which are not enclosed in any section (i.e. they are defined at the beginning of the file, before any section.

char IniParser.Model.IniData.SectionKeySeparator
getset

Used to mark the separation between the section name and the key name when using IniData.TryGetKey.

Defaults to '.'.

SectionDataCollection IniParser.Model.IniData.Sections
getset

Gets or sets all the SectionData for this IniData instance.

KeyDataCollection IniParser.Model.IniData.this[string sectionName]
get

Gets the KeyDataCollection instance with the specified section name.


このクラス詳解は次のファイルから抽出されました: