Reading raw data does not work for me.
... but with this patch to CsvContext.cs, it does:
Index: CsvContext.cs
--- CsvContext.cs (revision 2611) +++ CsvContext.cs (revision 2612) @@ -179,6 +179,7 @@ if (readingRawDataRows) { obj = row as T;
-
row = new T() as IDataRow; } else {
Hi,
Thanks for your bug report and fix. However, from your issue, I'm not sure what the bug is.
Could you please send me a pull request that includes 1) the code change; and 2) one or more unit tests that cover the bug that you solved.
Matt
Sorry, I am neither familiar with github nor with git. No idea how to "send a pull request".
The code change (no idea why my comment was cut off) is a simple one-liner: if (readingRawDataRows) { obj = row as T; Add this one: ---> row = new T() as IDataRow;
As it currently is, you are yielding always the same object when processing raw data. Calling clear() on it for each and every row. This results in a list with the correct number of lines, but all empty entries.
Maybe I'll find time for unit tests for this later, currently I have a deadline in my neck, approaching at awesome speed :-/
I'm experiencing this as well. I'll see if I can put together a PR tonight.