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

Base classs for delimited files (CSV, etc.) More...

Inheritance diagram for Utilities.IO.FileFormats.Delimited.Delimited:
Utilities.IO.FileFormats.BaseClasses.StringListFormatBase< Delimited, Row >

Public Member Functions

 Delimited ()
 Constructor More...
 
 Delimited (string FileContent)
 Constructor More...
 
 Delimited (string FileContent, string Delimiter)
 Constructor More...
 
void Parse (string FileContent)
 Parses file content and adds it to the delimited file More...
 
DataTable ToDataTable (bool FirstRowIsHeader=true, params string[] Headers)
 Converts the delimited file to a DataTable More...
 
override string ToString ()
 To string function More...
 
- Public Member Functions inherited from Utilities.IO.FileFormats.BaseClasses.StringListFormatBase< Delimited, Row >
void Add (RecordType item)
 Adds a Record to the file More...
 
void Clear ()
 Clears the file More...
 
bool Contains (RecordType item)
 Determines if the file contains a Record More...
 
void CopyTo (RecordType[] array, int arrayIndex)
 Copies the delimited file to an array More...
 
IEnumerator< RecordType > GetEnumerator ()
 Gets the enumerator for the delimited file More...
 
int IndexOf (RecordType item)
 Index of a specific Record More...
 
void Insert (int index, RecordType item)
 Inserts a Record at a specific index More...
 
bool Remove (RecordType item)
 Removes a Record from the file More...
 
void RemoveAt (int index)
 Removes a Record at a specific index More...
 

Static Public Member Functions

static implicit operator Delimited (DataTable Value)
 Converts the string to the format specified 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.StringListFormatBase< Delimited, Row >
 StringListFormatBase ()
 Constructor More...
 

Properties

string Delimiter [get, set]
 The delimiter used to seperate values (must be overridden) More...
 
- Properties inherited from Utilities.IO.FileFormats.BaseClasses.StringListFormatBase< Delimited, Row >
int Count [get]
 Count of records More...
 
bool IsReadOnly [get]
 Is read only? More...
 
IList< RecordType > Records [get]
 The list of records More...
 
RecordType this[int Position] [get, set]
 Individual records More...
 

Detailed Description

Base classs for delimited files (CSV, etc.)

Definition at line 35 of file Delimited.cs.

Constructor & Destructor Documentation

Utilities.IO.FileFormats.Delimited.Delimited.Delimited ( )

Constructor

Definition at line 40 of file Delimited.cs.

Utilities.IO.FileFormats.Delimited.Delimited.Delimited ( string  FileContent)

Constructor

Parameters
FileContentFile content

Definition at line 48 of file Delimited.cs.

Utilities.IO.FileFormats.Delimited.Delimited.Delimited ( string  FileContent,
string  Delimiter 
)

Constructor

Parameters
FileContentFile content
DelimiterDelimiter that the system uses

Definition at line 58 of file Delimited.cs.

Member Function Documentation

override void Utilities.IO.FileFormats.Delimited.Delimited.LoadFromData ( string  Data)
protected

Loads the object from the data specified

Parameters
DataData to load into the object

Definition at line 165 of file Delimited.cs.

static implicit Utilities.IO.FileFormats.Delimited.Delimited.operator Delimited ( DataTable  Value)
static

Converts the string to the format specified

Parameters
ValueValue to convert
Returns
The string as an object

Definition at line 76 of file Delimited.cs.

void Utilities.IO.FileFormats.Delimited.Delimited.Parse ( string  FileContent)

Parses file content and adds it to the delimited file

Parameters
FileContentFile content

Definition at line 103 of file Delimited.cs.

DataTable Utilities.IO.FileFormats.Delimited.Delimited.ToDataTable ( bool  FirstRowIsHeader = true,
params string[]  Headers 
)

Converts the delimited file to a DataTable

Parameters
FirstRowIsHeaderDetermines if the first row should be treated as a header or not
HeadersHeaders for the columns if the first row is not a header
Returns
The delimited file as a DataTable

Definition at line 123 of file Delimited.cs.

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

To string function

Returns
A string containing the file information

Definition at line 154 of file Delimited.cs.

Property Documentation

string Utilities.IO.FileFormats.Delimited.Delimited.Delimiter
getset

The delimiter used to seperate values (must be overridden)

Definition at line 67 of file Delimited.cs.


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