Struct StructHandle
- Namespace
- Echo.Platforms.AsmResolver.Emulation
- Assembly
- Echo.Platforms.AsmResolver.dll
Represents an address to a structure within a CIL virtual machine.
public readonly struct StructHandle : IEquatable<StructHandle>
- Implements
- Inherited Members
Constructors
StructHandle(CilVirtualMachine, long)
Creates a new struct handle from the provided address.
public StructHandle(CilVirtualMachine machine, long address)
Parameters
machineCilVirtualMachineThe machine the address is valid in.
addresslongThe address.
Properties
Address
Gets the address to the beginning of the object.
public long Address { get; }
Property Value
Machine
Gets the machine the structures lives in.
public CilVirtualMachine Machine { get; }
Property Value
Methods
Equals(StructHandle)
public bool Equals(StructHandle other)
Parameters
otherStructHandle
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetFieldAddress(IFieldDescriptor)
Obtains the absolute address of a field within the structure.
public long GetFieldAddress(IFieldDescriptor field)
Parameters
fieldIFieldDescriptorThe field to obtain the address for.
Returns
- long
The address.
GetHashCode()
public override int GetHashCode()
Returns
ReadField(IFieldDescriptor)
Copies the value of a field into a new bit vector.
public BitVector ReadField(IFieldDescriptor field)
Parameters
fieldIFieldDescriptorThe field to obtain the value for.
Returns
- BitVector
The value.
ReadField(IFieldDescriptor, BitVectorSpan)
Copies the value of a field into a bit vector.
public void ReadField(IFieldDescriptor field, BitVectorSpan buffer)
Parameters
fieldIFieldDescriptorThe field to obtain the value for.
bufferBitVectorSpanThe buffer to copy the value into.
ToString()
public override string ToString()
Returns
WriteField(IFieldDescriptor, BitVectorSpan)
Copies the provided bit vector into a field of the object.
public void WriteField(IFieldDescriptor field, BitVectorSpan buffer)
Parameters
fieldIFieldDescriptorThe field to write to.
bufferBitVectorSpanThe bits to write.