Replace old charting curves with new version
This commit is contained in:
@@ -19,7 +19,7 @@ namespace LeafWeb.Core.Parsers
|
||||
throw new FileNotFoundException($"Cannot find file '{csvFile.Name}'");
|
||||
|
||||
_reader = File.OpenText(csvFile.FullName);
|
||||
var csvConfiguration = new CsvConfiguration { HasHeaderRecord = false, IgnoreBlankLines = false};
|
||||
var csvConfiguration = new CsvConfiguration { HasHeaderRecord = false, IgnoreBlankLines = false, IgnoreReadingExceptions = true};
|
||||
CsvReader = new CsvReader(_reader, csvConfiguration);
|
||||
}
|
||||
|
||||
@@ -29,16 +29,7 @@ namespace LeafWeb.Core.Parsers
|
||||
if (!CsvReader.Read())
|
||||
return null;
|
||||
|
||||
// put all the values from this row into an array
|
||||
var values = new List<string>();
|
||||
var index = 0;
|
||||
string value;
|
||||
while (CsvReader.TryGetField(index, out value))
|
||||
{
|
||||
values.Add(value);
|
||||
index++;
|
||||
}
|
||||
return values.ToArray();
|
||||
return CsvReader.CurrentRecord;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
||||
Reference in New Issue
Block a user