public IEnumerable<DropShipperFileRawEntry> ReadEntries(File file, IDropShipper dropShipper) { var entryNumber = 0; var entires = new List<DropShipperFileRawEntry>(); file.ReadTextFrom(reader => { string line; while ((line = reader.ReadLine()) != null) { entryNumber++; var entry = new DropShipperFileRawEntry { EntryNumber = entryNumber, File = file, RawData = line, DropShipper = dropShipper, EffectiveDate = DateTime.Today }; entires.Add(entry); } }, true); return entires; }
public IEnumerable<VendorFileRawEntry> ReadEntries(File file, IVendor vendor) { int entryNumber = 0; var entires = new List<VendorFileRawEntry>(); file.ReadTextFrom(reader => { while (true) { var line = reader.ReadLine(); if (line == null) break; entryNumber++; var entry = new VendorFileRawEntry { EntryNumber = entryNumber, File = file, RawData = line, Vendor = vendor, EffectiveDate = DateTime.Today }; entires.Add(entry); } }, true); return entires; }