Exemple #1
0
        public double ReadDouble(uint offset)
        {
            EnsureOffsetInRange(offset, 7);
            byte *data = _base + offset;

            return(NativePrimitiveDecoder.ReadDouble(ref data));
        }
Exemple #2
0
        public unsafe float ReadFloat(uint offset)
        {
            EnsureOffsetInRange(offset, 3);
            byte *data = _base + offset;

            return(NativePrimitiveDecoder.ReadFloat(ref data));
        }
Exemple #3
0
        public ulong ReadUInt64(uint offset)
        {
            EnsureOffsetInRange(offset, 7);
            byte *data = _base + offset;

            return(NativePrimitiveDecoder.ReadUInt64(ref data));
        }
Exemple #4
0
        public uint ReadUInt32(uint offset)
        {
            EnsureOffsetInRange(offset, 3);
            byte *data = _base + offset;

            return(NativePrimitiveDecoder.ReadUInt32(ref data));
        }
        public NativeParser GetLookbackParser(uint lookback)
        {
            // Adjust the lookback by the size of the TypeSignatureKind element and the minimum lookback size
            uint adjustedLookback = lookback + NativePrimitiveDecoder.GetUnsignedEncodingSize(lookback << 4) + 2;

            return(new NativeParser(_reader, _offset - adjustedLookback));
        }
Exemple #6
0
        public uint SkipInteger(uint offset)
        {
            EnsureOffsetInRange(offset, 0);

            byte *data = _base + offset;

            NativePrimitiveDecoder.SkipInteger(ref data);
            return((uint)(data - _base));
        }
Exemple #7
0
        public uint DecodeSignedLong(uint offset, out long value)
        {
            EnsureOffsetInRange(offset, 0);

            byte *data = _base + offset;

            value = NativePrimitiveDecoder.DecodeSignedLong(ref data, _base + _size);
            return((uint)(data - _base));
        }