C# Class Fusion.Core.IniParser.Model.IniData

Represents all data from an INI file
Inheritance: ICloneable
Mostra file Open project: demiurghg/FusionEngine Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

ClearAllComments() public method

Deletes all comments in all sections and key values
public ClearAllComments ( ) : void
return void

Clone() public method

Creates a new object that is a copy of the current instance.
public Clone ( ) : object
return object

GetKey() public method

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. ///
return string

IniData() public method

Initializes an empty IniData instance.
public IniData ( ) : System
return System

IniData() public method

public IniData ( IniData ori ) : System
ori IniData
return System

IniData() public method

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 ///
return System

Merge() public method

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. ///
return void

ToString() public method

public ToString ( ) : string
return string

ToString() public method

public ToString ( IIniDataFormatter formatter ) : string
formatter IIniDataFormatter
return string

TryGetKey() public method

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. ///
return bool

this() public method

Gets the KeyDataCollection instance with the specified section name.
public this ( string sectionName ) : KeyDataCollection
sectionName string
return KeyDataCollection