/// <summary> /// Initializes a new instance of the ClearingParser class. /// </summary> /// <param name="log"> /// The CommerceLog object through which log entries can be made. /// </param> public ClearingParser(CommerceLog log) { Log = log; ClearingHeaderParser = new ClearingHeaderParser(log); ClearingDataParser = new ClearingDataParser(log); ClearingTrailerParser = new ClearingTrailerParser(log); }
/// <summary> /// Parses a data record. /// </summary> /// <remarks> /// A null item may be added. /// </remarks> private void ParseDataRecord() { ClearingData clearingData = ClearingDataParser.Parse(Line, NumberOfDataRecords++); if (clearingData == null) { Log.Error("Record in line #{0} from file \"{1}\" could not be parsed.", null, (int)ResultCode.CorruptSettlementRecord, LineNumber, FileName); } Clearing.DataRecords.Add(clearingData); }