/// <summary> /// Initializes a new instance of the ExtractParser class. /// </summary> /// <param name="log"> /// The CommerceLog object through which log entries can be made. /// </param> public ExtractParser(CommerceLog log) { Log = log; ExtractHeaderParser = new ExtractHeaderParser(log); RedemptionDetailParser = new RedemptionDetailParser(log); SettlementDetailParser = new SettlementDetailParser(log); TransactionNotificationParser = new TransactionNotificationParser(log); ExtractFooterParser = new ExtractFooterParser(log); }
/// <summary> /// Parses a redemption detail record. /// </summary> /// <remarks> /// A null item may be added. /// </remarks> private void ParseRedemptionDetailRecord() { RedemptionDetail redemptionDetail = RedemptionDetailParser.Parse(Line, NumberOfRedemptionDetailRecords++); if (redemptionDetail == null) { Log.Error("Record in line #{0} from file \"{1}\" could not be parsed.", null, (int)ResultCode.CorruptSettlementRecord, LineNumber, FileName); } Extract.RedemptionDetailRecords.Add(redemptionDetail); }