Example #1
0
        public override void Read(ReadArgs args)
        {
            // read Version Record Code '0,'
            if (args.ReadOne() != iDigit0 || args.ReadOne() != iFieldSep)
            {
                throw Error.UnexpectedRecordType(RecordType.Version, RecordType.Unknown);
            }
            args.CurrentSeqNo = 0;

            // TODO - version validation ??

            VersionRecord vr = new VersionRecord(base.ReadStringStrict(args));

            args.dcRecords[args.CurrentSeqNo] = vr;
            args.Read.Read(vr);

            int readChar = args.ReadOne();

            if (readChar == iRecordSep)
            {
                args.State = ReaderNewRecord.Singleton;
            }
            else if (readChar == -1)
            {
                args.State = ReaderEnd.Singleton;
            }
            else
            {
                throw Error.Unexpected(ErrorCode.UnexpectedChars, Constants.RecordSeparator, readChar);
            }
        }
Example #2
0
 public virtual void Read(VersionRecord verRec)
 {
 }
Example #3
0
 public virtual void Read(VersionRecord verRec)
 {
     throw new InvalidOperationException();
 }