Craig's Utility Library  4.0 Beta
Utilities.IO.FileFormats.INI Class Reference

Class for helping with INI files More...

Inheritance diagram for Utilities.IO.FileFormats.INI:
Utilities.IO.FileFormats.BaseClasses.StringFormatBase< INI >

Public Member Functions

 INI ()
 Constructor More...
 
 INI (string FileName)
 Constructor More...
 
virtual bool DeleteFromINI (string Section)
 Deletes a section from the INI file More...
 
virtual bool DeleteFromINI (string Section, string Key)
 Deletes a key from the INI file More...
 
virtual string ReadFromINI (string Section, string Key, string DefaultValue="")
 Reads a value from an INI file More...
 
override string ToString ()
 Convert the INI to a string More...
 
virtual string ToXML ()
 Returns an XML representation of the INI file More...
 
virtual void WriteToINI (string Section, string Key, string Value)
 Writes a change to an INI file More...
 
- Public Member Functions inherited from Utilities.IO.FileFormats.BaseClasses.StringFormatBase< INI >
override object Clone ()
 Clones the object More...
 
override int CompareTo (FormatType other)
 Compares the object to another object More...
 
override bool Equals (FormatType other)
 Determines if the objects are equal More...
 
override FormatType Save (string Location)
 Saves the object More...
 

Protected Member Functions

override void LoadFromData (string Data)
 Loads the object from the data specified More...
 
- Protected Member Functions inherited from Utilities.IO.FileFormats.BaseClasses.StringFormatBase< INI >
 StringFormatBase ()
 Constructor More...
 
override FormatType InternalLoad (string Location)
 Loads the object from the location specified More...
 

Properties

virtual string FileName [get, set]
 Name of the file More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Utilities.IO.FileFormats.BaseClasses.StringFormatBase< INI >
static implicit operator string (StringFormatBase< FormatType > Value)
 Converts the format to a string More...
 
static implicit operator StringFormatBase< FormatType > (string Value)
 Converts the string to the format specified More...
 

Detailed Description

Class for helping with INI files

Definition at line 34 of file INI.cs.

Constructor & Destructor Documentation

Utilities.IO.FileFormats.INI.INI ( )

Constructor

Definition at line 41 of file INI.cs.

Utilities.IO.FileFormats.INI.INI ( string  FileName)

Constructor

Parameters
FileNameName of the file

Definition at line 50 of file INI.cs.

Member Function Documentation

virtual bool Utilities.IO.FileFormats.INI.DeleteFromINI ( string  Section)
virtual

Deletes a section from the INI file

Parameters
SectionSection to remove
Returns
True if it is removed, false otherwise

Definition at line 71 of file INI.cs.

virtual bool Utilities.IO.FileFormats.INI.DeleteFromINI ( string  Section,
string  Key 
)
virtual

Deletes a key from the INI file

Parameters
SectionSection the key is under
KeyKey to remove
Returns
True if it is removed, false otherwise

Definition at line 88 of file INI.cs.

override void Utilities.IO.FileFormats.INI.LoadFromData ( string  Data)
protectedvirtual

Loads the object from the data specified

Parameters
DataData to load into the object

Implements Utilities.IO.FileFormats.BaseClasses.StringFormatBase< INI >.

Definition at line 184 of file INI.cs.

virtual string Utilities.IO.FileFormats.INI.ReadFromINI ( string  Section,
string  Key,
string  DefaultValue = "" 
)
virtual

Reads a value from an INI file

Parameters
SectionSection
KeyKey
DefaultValueDefault value if it does not exist

Definition at line 105 of file INI.cs.

override string Utilities.IO.FileFormats.INI.ToString ( )

Convert the INI to a string

Returns
The INI file as a string

Definition at line 116 of file INI.cs.

virtual string Utilities.IO.FileFormats.INI.ToXML ( )
virtual

Returns an XML representation of the INI file

Returns
An XML representation of the INI file

Definition at line 132 of file INI.cs.

virtual void Utilities.IO.FileFormats.INI.WriteToINI ( string  Section,
string  Key,
string  Value 
)
virtual

Writes a change to an INI file

Parameters
SectionSection
KeyKey
ValueValue

Definition at line 158 of file INI.cs.

Property Documentation

virtual string Utilities.IO.FileFormats.INI.FileName
getset

Name of the file

Definition at line 59 of file INI.cs.


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