/// <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 transaction notification record. /// </summary> /// <remarks> /// A null item may be added. /// </remarks> private void ParseTransactionNotificationRecord() { TransactionNotification transactionNotification = TransactionNotificationParser.Parse(Line, NumberOfTransactionNotificationRecords++); if (transactionNotification == null) { Log.Error("Record in line #{0} from file \"{1}\" could not be parsed.", null, (int)ResultCode.CorruptSettlementRecord, LineNumber, FileName); } Extract.TransactionNotificationRecords.Add(transactionNotification); }