C# Класс Fusion.Core.IniParser.Model.IniData

Represents all data from an INI file
Наследование: ICloneable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ClearAllComments ( ) : void

Deletes all comments in all sections and key values

Clone ( ) : object

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

GetKey ( string key ) : string

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

IniData ( ) : System

Initializes an empty IniData instance.

IniData ( IniData ori ) : System
IniData ( SectionDataCollection sdc ) : System

Initializes a new IniData instance using a previous SectionDataCollection.

Merge ( IniData toMergeIniData ) : void

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

ToString ( ) : string
ToString ( IIniDataFormatter formatter ) : string
TryGetKey ( string key, string &value ) : bool

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

this ( string sectionName ) : KeyDataCollection

Gets the KeyDataCollection instance with the specified section name.

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

Метод Описание
MergeGlobal ( KeyDataCollection globals ) : void

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

MergeSection ( SectionData otherSection ) : void

Merge the sections into this by overwriting this sections.

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

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

Deletes all comments in all sections and key values
public ClearAllComments ( ) : void
Результат void

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

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
Результат object

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

Retrieves a key using a single input string combining section and key name.
/// key contained multiple separators. ///
public GetKey ( string key ) : string
key string /// The section and key name to retrieve, separated by . /// /// If key contains no separator, it is treated as a key in the section. /// /// Key may contain no more than one separator character. ///
Результат string

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

Initializes an empty IniData instance.
public IniData ( ) : System
Результат System

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

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

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

Initializes a new IniData instance using a previous SectionDataCollection.
public IniData ( SectionDataCollection sdc ) : System
sdc SectionDataCollection /// object containing the /// data with the sections of the file ///
Результат System

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

Merges the other iniData into this one by overwriting existing values. Comments get appended.
public Merge ( IniData toMergeIniData ) : void
toMergeIniData IniData /// IniData instance to merge into this. /// If it is null this operation does nothing. ///
Результат void

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

public ToString ( ) : string
Результат string

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

public ToString ( IIniDataFormatter formatter ) : string
formatter IIniDataFormatter
Результат string

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

Attempts to retrieve a key, using a single string combining section and key name.
/// key contained multiple separators. ///
public TryGetKey ( string key, string &value ) : bool
key string /// The section and key name to retrieve, separated by . /// /// If key contains no separator, it is treated as a key in the section. /// /// Key may contain no more than one separator character. ///
value string /// If true is returned, is set to the value retrieved. Otherwise, is set /// to an empty string. ///
Результат bool

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

Gets the KeyDataCollection instance with the specified section name.
public this ( string sectionName ) : KeyDataCollection
sectionName string
Результат KeyDataCollection