C# Class DynoPhile.DynoPhileReader

Show file Open project: codereflection/DynoPhile Class Usage Examples

Public Methods

Method Description
ReadFile ( string filename, string delimitor ) : IList

Imports a csv file with headers

ReadFile ( string filename, string delimitor, Func resultTypeBuilder ) : IList

Imports a csv file, one that does not have headers, you'll create your own with resultTypeBuilder

Private Methods

Method Description
AssignLineValues ( IList fields, object>.IDictionary newItem ) : void
BuildResultType ( string header ) : dynamic
DoWork ( IList lines, List result, Func resultTypeBuilder, bool hasHeader ) : IList

Method Details

ReadFile() public method

Imports a csv file with headers
public ReadFile ( string filename, string delimitor ) : IList
filename string File to import
delimitor string Delimitor, such as ,
return IList

ReadFile() public method

Imports a csv file, one that does not have headers, you'll create your own with resultTypeBuilder
public ReadFile ( string filename, string delimitor, Func resultTypeBuilder ) : IList
filename string File to import
delimitor string Delimitor, such as ,
resultTypeBuilder Func Func to call that will build out a new dynamic object to add values too
return IList