public void OnReadAll(IDataWriter <int> dataWriter) { int index = 0; if (tableReader.Count != 1) { while (tableReader.Read()) { dataWriter[index].WriteObject(tableReader); ++index; } return; } while (tableReader.Read()) { var valueWriter = dataWriter[index]; try { valueWriter.WriteObject(tableReader); } catch (Exception e) { try { tableReader.OnReadValue(0, valueWriter); } catch (Exception) { throw e; } } ++index; } }