/// <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 footer record. /// </summary> /// <remarks> /// A null item may be added. /// </remarks> private void ParseFooterRecord() { if (NumberOfFooterRecords == 0) { Extract.Footer = ExtractFooterParser.Parse(Line); NumberOfFooterRecords = 1; } else { Log.Warning("Error parsing record in line #{0} from file \"{1}\". More than one footer record found. All " + "footer records after the first one encountered will be ignored.", (int)ResultCode.UnexpectedDuplicateRecordTypeFound, LineNumber, FileName); } }