protected virtual void ProcessRow(SafeReader sr) { LastRowType = null; RowType nRowType; string sRowType = sr.ContainsField("DatumType", "RowType") ? sr["DatumType"] : sr["RowType"]; if (!Enum.TryParse(sRowType, out nRowType)) { Log.Alert("Unsupported row type encountered: '{0}'.", sRowType); return; } // if LastRowType = nRowType; Log.Debug("Auto approve agent, processing input row of type {0}.", sRowType); switch (nRowType) { case RowType.MetaData: sr.Fill(MetaData); break; case RowType.Payment: Payments.Add(sr.Fill <Payment>()); break; case RowType.OriginationTime: OriginationTime.Process(sr); break; case RowType.Turnover: Turnover.Add(sr.Fill <TurnoverDbRow>()); break; case RowType.DirectorName: DirectorNames.Add(new Name(sr["FirstName"], sr["LastName"])); break; case RowType.HmrcBusinessName: if (sr["BelongsToCustomer"]) { HmrcBusinessNames.Add(new NameForComparison(sr["Name"])); } break; case RowType.ExperianConsumerDataCais: this.caisAccounts.Add(sr.Fill <ExperianConsumerDataCaisAccounts>()); break; case RowType.CompanyDissolutionDate: MetaData.CompanyDissolutionDate = sr["CompanyDissolutionDate"]; break; default: throw new ArgumentOutOfRangeException(); } // switch } // ProcessRow