Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Parses a trailer record.
        /// </summary>
        /// <remarks>
        /// A null item may be added.
        /// </remarks>
        private void ParseTrailerRecord()
        {
            if (NumberOfTrailerRecords == 0)
            {
                Clearing.Trailer = ClearingTrailerParser.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++;
        }