My Project
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
IniParser.Model.SectionDataCollection Class Reference
Inheritance diagram for IniParser.Model.SectionDataCollection:

Public Member Functions

 SectionDataCollection ()
 Initializes a new instance of the SectionDataCollection class.
 
 SectionDataCollection (SectionDataCollection ori)
 Initializes a new instance of the SectionDataCollection class from a previous instance of SectionDataCollection.
 
bool AddSection (string keyName)
 Creates a new section with empty data.
 
void Add (SectionData data)
 Adds a new SectionData instance to the collection.
 
void Clear ()
 Removes all entries from this collection.
 
bool ContainsSection (string keyName)
 Gets if a section with a specified name exists in the collection.
 
SectionData GetSectionData (string sectionName)
 Returns the section data from a specify section given its name.
 
void Merge (SectionDataCollection sectionsToMerge)
 
void SetSectionData (string sectionName, SectionData data)
 Sets the section data for given a section name.
 
bool RemoveSection (string keyName)
 
IEnumerator< SectionDataGetEnumerator ()
 Returns an enumerator that iterates through the collection.
 
object Clone ()
 Creates a new object that is a copy of the current instance.
 

Properties

int Count [get]
 Returns the number of SectionData elements in the collection.
 
KeyDataCollection this[string sectionName] [get]
 Gets the key data associated to a specified section name.
 

Detailed Description

Represents a collection of SectionData.

Constructor & Destructor Documentation

◆ SectionDataCollection()

IniParser.Model.SectionDataCollection.SectionDataCollection ( SectionDataCollection  ori)
inline

Initializes a new instance of the SectionDataCollection class from a previous instance of SectionDataCollection.

Data is deeply copied

Parameters
oriThe instance of the SectionDataCollection class used to create the new instance.

Member Function Documentation

◆ Add()

void IniParser.Model.SectionDataCollection.Add ( SectionData  data)
inline

Adds a new SectionData instance to the collection.

Parameters
dataData.

◆ AddSection()

bool IniParser.Model.SectionDataCollection.AddSection ( string  keyName)
inline

Creates a new section with empty data.

If a section with the same name exists, this operation has no effect.

Parameters
keyNameName of the section to be created

<return>true if the a new section with the specified name was added, false otherwise</return>

Exceptions
ArgumentExceptionIf the section name is not valid.

◆ Clone()

object IniParser.Model.SectionDataCollection.Clone ( )
inline

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

Returns
A new object that is a copy of this instance.

◆ ContainsSection()

bool IniParser.Model.SectionDataCollection.ContainsSection ( string  keyName)
inline

Gets if a section with a specified name exists in the collection.

Parameters
keyNameName of the section to search
Returns
true if a section with the specified name exists in the collection false otherwise

◆ GetEnumerator()

IEnumerator< SectionData > IniParser.Model.SectionDataCollection.GetEnumerator ( )
inline

Returns an enumerator that iterates through the collection.

Returns
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

◆ GetSectionData()

SectionData IniParser.Model.SectionDataCollection.GetSectionData ( string  sectionName)
inline

Returns the section data from a specify section given its name.

Parameters
sectionNameName of the section.
Returns
An instance of a SectionData class holding the section data for the currently INI data

◆ RemoveSection()

bool IniParser.Model.SectionDataCollection.RemoveSection ( string  keyName)
inline
Parameters
keyName

<return>true if the section with the specified name was removed, false otherwise</return>

◆ SetSectionData()

void IniParser.Model.SectionDataCollection.SetSectionData ( string  sectionName,
SectionData  data 
)
inline

Sets the section data for given a section name.

Parameters
sectionName
dataThe new SectionDatainstance.

Property Documentation

◆ this[string sectionName]

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

Gets the key data associated to a specified section name.

An instance of as KeyDataCollection class holding the key data from the current parsed INI data, or a null value if the section doesn't exist.


The documentation for this class was generated from the following file: