Esempio n. 1
0
 public PlainTextReader(PlainTextEndPoint endPoint, EndPointDataCollection collection)
 {
     this.endPoint   = endPoint;
     this.collection = collection;
     lineNumber      = -1;
     lines           = File.ReadAllLines(endPoint.Configuration.FilePath);
 }
Esempio n. 2
0
            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());
            }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
            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();
            }
Esempio n. 5
0
 public PlainTextWriter(PlainTextEndPoint endPoint, EndPointDataCollection collection)
 {
     this.endPoint   = endPoint;
     this.collection = collection;
 }
Esempio n. 6
0
 protected internal override DataItemWriter GetWriter(EndPointDataCollection collection)
 {
     return(new PlainTextWriter(this, collection));
 }
Esempio n. 7
0
 protected internal override DataItemReader GetReader(EndPointDataCollection collection)
 {
     return(new CsvReader(this, collection));
 }
Esempio n. 8
0
 protected internal override DataItemWriter GetWriter(EndPointDataCollection collection)
 {
     throw new System.NotImplementedException();
 }