TryReadLe() public method

public TryReadLe ( long imageOffset, PrimitiveType type, Constant &c ) : bool
imageOffset long
type PrimitiveType
c Constant
return bool
Exemplo n.º 1
0
        public bool TryReadLe(PrimitiveType dataType, out Constant c)
        {
            bool ret = image.TryReadLe(off, dataType, out c);

            if (ret)
            {
                off += (uint)dataType.Size;
            }
            return(ret);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Reads a chunk of bytes and interprets it in Little-Endian mode.
        /// </summary>
        /// <param name="type">Enough bytes read </param>
        /// <returns>The read value as a <see cref="Constant"/>.</returns>
        public bool TryReadLe(PrimitiveType dataType, out Constant c)
        {
            bool ret;

            if (mem is null)
            {
                ret = MemoryArea.TryReadLe(bytes, Offset, dataType, out c);
            }
            else
            {
                ret = mem.TryReadLe(off, dataType, out c);
            }
            if (ret)
            {
                off += (uint)dataType.Size;
            }
            return(ret);
        }
Exemplo n.º 3
0
 public override bool TryRead(MemoryArea mem, Address addr, PrimitiveType dt, out Constant value)
 {
     return(mem.TryReadLe(addr, dt, out value));
 }