Cache property lookups for the object parsing
This commit is contained in:
@@ -30,6 +30,7 @@ namespace LeafWeb.Core.Parsers
|
||||
|
||||
private IEnumerable<LeafGasComparison> ParseLeafGasComparisonSet(string[] fittingTitles)
|
||||
{
|
||||
var matcher = new ParseInfoPropertyMatcher<LeafGasComparisonPhotosyntheticInfo>();
|
||||
var endOfFile = false;
|
||||
while (!endOfFile)
|
||||
{
|
||||
@@ -43,7 +44,7 @@ namespace LeafWeb.Core.Parsers
|
||||
throw new ParseException($"Encountered empty line while readding fitting info on line {CsvReader.Row}");
|
||||
if (values == null) // end of file
|
||||
yield break;
|
||||
if (ParsedObjectFactory<LeafGasComparisonPhotosyntheticInfo>.IsPropertiesTitlesMatch(values))
|
||||
if (matcher.IsPropertiesTitlesMatch(values))
|
||||
{
|
||||
photosyntheticTitles = values;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user