/// <summary> /// Initializes a new instance of the RebateConfirmationParser class. /// </summary> /// <param name="log"> /// The CommerceLog object through which log entries can be made. /// </param> public RebateConfirmationParser(CommerceLog log) { Log = log; RebateConfirmationHeaderParser = new RebateConfirmationHeaderParser(log); RebateConfirmationDataParser = new RebateConfirmationDataParser(log); RebateConfirmationTrailerParser = new RebateConfirmationTrailerParser(log); }
/// <summary> /// Parses a trailer record. /// </summary> /// <remarks> /// A null item may be added. /// </remarks> private void ParseTrailerRecord() { if (NumberOfTrailerRecords == 0) { RebateConfirmation.Trailer = RebateConfirmationTrailerParser.Parse(Line); TrailerFound = true; } else { Log.Warning("Error parsing record in line #{0} from file \"{1}\". More than one trailer record found. All " + "trailer records after the first one encountered will be ignored.", (int)ResultCode.UnexpectedDuplicateRecordTypeFound, LineNumber, FileName); } NumberOfTrailerRecords++; }