public PlainTextReader(PlainTextEndPoint endPoint, EndPointDataCollection collection) { this.endPoint = endPoint; this.collection = collection; lineNumber = -1; lines = File.ReadAllLines(endPoint.Configuration.FilePath); }
public CsvWriter(CsvEndPoint endPoint, EndPointDataCollection collection) { this.endPoint = endPoint; this.collection = collection; streamWriter = new StreamWriter(endPoint.Configuration.FilePath, false); csvWriter = new CsvHelper.CsvWriter(streamWriter, endPoint.ConvertConfiguration()); }
public override IEnumerable <EndPointDataCollection> PopulateCollections(Mapping mapping) { // Data type has a single field, representing a line of the file contents var dataType = new DataStructureType("Line", new DataField("Value", typeof(string))); var collection = new EndPointDataCollection(this, "Lines", dataType); yield return(collection); }
public CsvReader(CsvEndPoint endPoint, EndPointDataCollection collection) { this.endPoint = endPoint; this.collection = collection; streamReader = new StreamReader(endPoint.Configuration.FilePath); csvReader = new CsvHelper.CsvReader(streamReader, endPoint.ConvertConfiguration()); recordEnumerator = csvReader.GetRecords <dynamic>().GetEnumerator(); }
public PlainTextWriter(PlainTextEndPoint endPoint, EndPointDataCollection collection) { this.endPoint = endPoint; this.collection = collection; }
protected internal override DataItemWriter GetWriter(EndPointDataCollection collection) { return(new PlainTextWriter(this, collection)); }
protected internal override DataItemReader GetReader(EndPointDataCollection collection) { return(new CsvReader(this, collection)); }
protected internal override DataItemWriter GetWriter(EndPointDataCollection collection) { throw new System.NotImplementedException(); }