Table of Contents

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

machine CilVirtualMachine

The machine the address is valid in.

address long

The address.

Properties

Address

Gets the address to the beginning of the object.

public long Address { get; }

Property Value

long

Machine

Gets the machine the structures lives in.

public CilVirtualMachine Machine { get; }

Property Value

CilVirtualMachine

Methods

Equals(StructHandle)

public bool Equals(StructHandle other)

Parameters

other StructHandle

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetFieldAddress(IFieldDescriptor)

Obtains the absolute address of a field within the structure.

public long GetFieldAddress(IFieldDescriptor field)

Parameters

field IFieldDescriptor

The field to obtain the address for.

Returns

long

The address.

GetHashCode()

public override int GetHashCode()

Returns

int

ReadField(IFieldDescriptor)

Copies the value of a field into a new bit vector.

public BitVector ReadField(IFieldDescriptor field)

Parameters

field IFieldDescriptor

The 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

field IFieldDescriptor

The field to obtain the value for.

buffer BitVectorSpan

The buffer to copy the value into.

ToString()

public override string ToString()

Returns

string

WriteField(IFieldDescriptor, BitVectorSpan)

Copies the provided bit vector into a field of the object.

public void WriteField(IFieldDescriptor field, BitVectorSpan buffer)

Parameters

field IFieldDescriptor

The field to write to.

buffer BitVectorSpan

The bits to write.