PageRenderTime 40ms CodeModel.GetById 4ms RepoModel.GetById 0ms app.codeStats 0ms

/Sources/DataAccess/RowFromStreamingTable.cs

https://github.com/tpwalke2/DataTable
C# | 36 lines | 32 code | 3 blank | 1 comment | 0 complexity | 3af3e5b6e0659bad60e48c31b2bcb8c6 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.IO;
  5. using System.Diagnostics;
  6. using System.Text.RegularExpressions;
  7. using System.Linq;
  8. using System.Collections.ObjectModel;
  9. namespace DataAccess
  10. {
  11. // Representation of a row when the values are already computed (perhaps from a stream reader)
  12. internal class RowFromStreamingTable : Row
  13. {
  14. readonly IList<string> _values;
  15. readonly DataTable _table;
  16. internal RowFromStreamingTable(IList<string> values, DataTable table)
  17. {
  18. _values = values;
  19. _table = table;
  20. }
  21. public override IList<string> Values
  22. {
  23. get
  24. {
  25. return new ReadOnlyCollection<string>(_values);
  26. }
  27. }
  28. public override IEnumerable<string> ColumnNames
  29. {
  30. get { return _table.ColumnNames; }
  31. }
  32. }
  33. }