public void Read(ExtBinaryReader reader) { sourceFileIndex = reader.ReadInt32(); position = reader.ReadInt32(); length = reader.ReadInt32(); line = reader.ReadInt32(); column = reader.ReadInt32(); }
public void Read(ExtBinaryReader reader) { blobIndex = reader.ReadInt32(); bankNameIndex = reader.ReadInt32(); startAddress = reader.ReadInt64(); kind = (SectionKind)reader.ReadInt16(); customSectionNameIndex = reader.ReadInt32(); accessMode = (SectionAccessMode)reader.ReadInt16(); }
public void Read(ExtBinaryReader reader) { signature = reader.ReadArrayOfPrimitives(reader.ReadInt32(), reader.ReadByte); if (Equals(signature, CorrectSignature)) { throw new Exception("Incorrect file. Wrong signature"); } formatVersion = reader.ReadInt32(); platformNameIndex = reader.ReadInt32(); platformVersion = reader.ReadInt32(); entryPoint = reader.ReadInt64(); }
public void Read(ExtBinaryReader reader) { sectionsCount = reader.ReadInt32(); symbolsCount = reader.ReadInt32(); sourceFilesCount = reader.ReadInt32(); sourceTextRangesCount = reader.ReadInt32(); sourceCodePointsCount = reader.ReadInt32(); blobsCount = reader.ReadInt32(); stringsCount = reader.ReadInt32(); }
public BSONIterator(Stream input) { if (!input.CanRead) { Dispose(); throw new IOException("Input stream must be readable"); } if (!input.CanSeek) { Dispose(); throw new IOException("Input stream must be seekable"); } this._input = new ExtBinaryReader(input); this._ctype = BSONType.UNKNOWN; this._doclen = _input.ReadInt32(); if (this._doclen < 5) { Dispose(); throw new InvalidBSONDataException("Unexpected end of BSON document"); } }
public void Read(ExtBinaryReader reader) { fileNameIndex = reader.ReadInt32(); sha256hashBytesIndex = reader.ReadInt32(); }
public BSONType Next() { CheckDisposed(); if (_ctype == BSONType.EOO) { return(BSONType.EOO); } if (!_entryDataSkipped && _ctype != BSONType.UNKNOWN) { SkipData(); } byte bv = _input.ReadByte(); if (!Enum.IsDefined(typeof(BSONType), bv)) { throw new InvalidBSONDataException("Unknown bson type: " + bv); } _entryDataSkipped = false; _entryDataValue = null; _entryKey = null; _ctype = (BSONType)bv; _entryLen = 0; if (_ctype != BSONType.EOO) { ReadKey(); } switch (_ctype) { case BSONType.EOO: Dispose(); return(BSONType.EOO); case BSONType.UNDEFINED: case BSONType.NULL: case BSONType.MAXKEY: case BSONType.MINKEY: _entryLen = 0; break; case BSONType.BOOL: _entryLen = 1; break; case BSONType.INT: _entryLen = 4; break; case BSONType.LONG: case BSONType.DOUBLE: case BSONType.TIMESTAMP: case BSONType.DATE: _entryLen = 8; break; case BSONType.OID: _entryLen = 12; break; case BSONType.STRING: case BSONType.CODE: case BSONType.SYMBOL: _entryLen = _input.ReadInt32(); break; case BSONType.DBREF: //Unsupported DBREF! _entryLen = 12 + _input.ReadInt32(); break; case BSONType.BINDATA: _entryLen = 1 + _input.ReadInt32(); break; case BSONType.OBJECT: case BSONType.ARRAY: case BSONType.CODEWSCOPE: _entryLen = _input.ReadInt32() - 4; Debug.Assert(_entryLen > 0); break; case BSONType.REGEX: _entryLen = 0; break; default: throw new InvalidBSONDataException("Unknown entry type: " + _ctype); } return(_ctype); }
public void Read(ExtBinaryReader reader) { sectionIndex = reader.ReadInt32(); blobEntryIndex = reader.ReadInt64(); nameIndex = reader.ReadInt32(); }
public void Read(ExtBinaryReader reader) { address = reader.ReadInt64(); sourceOperationRangeIndex = reader.ReadInt32(); }
public void Read(ExtBinaryReader reader) => str = new string(reader.ReadChars(reader.ReadInt32()));