A field in a ModuleRecord.
        public RecordReader(RecordHeader record, BinaryReader reader)
        {
            this.record = record;
            this.field = new RecordField();

            if (record.IsCompressed) {
                this.reader = null;
                this.compressedReader = reader;
                this.endOffset = -1;
            } else {
                this.reader = reader;
                this.compressedReader = null;
                this.endOffset = record.EndOffset;
            }
        }
Exemple #2
0
        public RecordReader(RecordHeader record, BinaryReader reader)
        {
            this.record = record;
            this.field  = new RecordField();

            if (record.IsCompressed)
            {
                this.reader           = null;
                this.compressedReader = reader;
                this.endOffset        = -1;
            }
            else
            {
                this.reader           = reader;
                this.compressedReader = null;
                this.endOffset        = record.EndOffset;
            }
        }
 /// <summary>Attempt to read a <see cref="RecordField"/> header, storing it in <see cref="Field"/>, returning whether there is one or if the end has been reached.</summary>
 /// <returns>Whether there is a field or the end has been reached.</returns>
 public bool ReadField()
 {
     CheckEnd();
     if (Reader.BaseStream.Position >= endOffset)
         return false;
     field = new RecordField(Reader);
     return true;
 }
 /// <summary>Skip past any and all <see cref="RecordField"/>s to the end of the <see cref="Record"/>. This will nullify <see cref="Field"/>.</summary>
 public void SkipToEndOfRecord()
 {
     field = new RecordField();
     (reader ?? compressedReader).BaseStream.Position = record.EndOffset;
 }
Exemple #5
0
 /// <summary>Skip past any and all <see cref="RecordField"/>s to the end of the <see cref="Record"/>. This will nullify <see cref="Field"/>.</summary>
 public void SkipToEndOfRecord()
 {
     field = new RecordField();
     (reader ?? compressedReader).BaseStream.Position = record.EndOffset;
 }