Table of Contents

Struct AddressRange

Namespace
Echo
Assembly
Echo.dll

Represents an address range in memory.

public readonly struct AddressRange
Inherited Members

Constructors

AddressRange(long, long)

Creates a new address range.

public AddressRange(long start, long end)

Parameters

start long

The starting address.

end long

The exclusive ending address.

Fields

NilRange

A range that starts and ends at index 0.

public static readonly AddressRange NilRange

Field Value

AddressRange

Properties

End

Gets the address where this address range stops. This address is exclusive.

public long End { get; }

Property Value

long

Length

Gets the total length of the address range.

public long Length { get; }

Property Value

long

Start

Gets the address of the first byte in the address range.

public long Start { get; }

Property Value

long

Methods

Contains(AddressRange)

Determines whether the address range contains the provided sub range.

public bool Contains(AddressRange range)

Parameters

range AddressRange

The address range.

Returns

bool

true if the sub range falls within the range, false otherwise.

Contains(long)

Determines whether the provided address falls within the address range.

public bool Contains(long address)

Parameters

address long

The address.

Returns

bool

true if the address falls within the range, false otherwise.

Equals(in AddressRange)

Determines whether the range is considered equal with the provided range.

public bool Equals(in AddressRange other)

Parameters

other AddressRange

The other range.

Returns

bool

true if the ranges are considered equal, false otherwise.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Expand(AddressRange)

Expands the address range such that the provided address range is included in the total range.

public AddressRange Expand(AddressRange other)

Parameters

other AddressRange

The other address range to include.

Returns

AddressRange

The new expanded range.

Expand(long)

Expands the address range such that the provided offset is included in the range.

public AddressRange Expand(long offset)

Parameters

offset long

The offset to include.

Returns

AddressRange

The new expanded range.

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(AddressRange, AddressRange)

Determines whether two address ranges are considered equal.

public static bool operator ==(AddressRange a, AddressRange b)

Parameters

a AddressRange

The first range.

b AddressRange

The second range.

Returns

bool

true if the ranges are considered equal, false otherwise.

operator !=(AddressRange, AddressRange)

Determines whether two address ranges are not considered equal.

public static bool operator !=(AddressRange a, AddressRange b)

Parameters

a AddressRange

The first range.

b AddressRange

The second range.

Returns

bool

true if the ranges are not considered equal, false otherwise.