private Dictionary <RowHash, TDto> ReadWithHashes(Dictionary <RowHash, List <object> > rowData) { var result = new Dictionary <RowHash, TDto>(); foreach (var(key, values) in rowData) { try { var dto = _parser.ReadRow(values); result.Add(key, dto); } catch (InvalidRowDataException ex) { Reporter.ReportError(Entity, key.IdHash, ex); } } return(result); }
private Dictionary <RowHash, PokemonSheetDto> ReadWithHashes(Dictionary <RowHash, List <object> > rowData) { return(rowData .Select(row => new { hash = row.Key, values = _parser.ReadRow(row.Value) }) .ToDictionary(x => x.hash, x => x.values)); }