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
Fields
NilRange
A range that starts and ends at index 0.
public static readonly AddressRange NilRange
Field Value
Properties
End
Gets the address where this address range stops. This address is exclusive.
public long End { get; }
Property Value
Length
Gets the total length of the address range.
public long Length { get; }
Property Value
Start
Gets the address of the first byte in the address range.
public long Start { get; }
Property Value
Methods
Contains(AddressRange)
Determines whether the address range contains the provided sub range.
public bool Contains(AddressRange range)
Parameters
rangeAddressRangeThe address range.
Returns
- bool
trueif 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
addresslongThe address.
Returns
- bool
trueif 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
otherAddressRangeThe other range.
Returns
- bool
trueif the ranges are considered equal,falseotherwise.
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Expand(AddressRange)
Expands the address range such that the provided address range is included in the total range.
public AddressRange Expand(AddressRange other)
Parameters
otherAddressRangeThe 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
offsetlongThe offset to include.
Returns
- AddressRange
The new expanded range.
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(AddressRange, AddressRange)
Determines whether two address ranges are considered equal.
public static bool operator ==(AddressRange a, AddressRange b)
Parameters
aAddressRangeThe first range.
bAddressRangeThe second range.
Returns
- bool
trueif the ranges are considered equal,falseotherwise.
operator !=(AddressRange, AddressRange)
Determines whether two address ranges are not considered equal.
public static bool operator !=(AddressRange a, AddressRange b)
Parameters
aAddressRangeThe first range.
bAddressRangeThe second range.
Returns
- bool
trueif the ranges are not considered equal,falseotherwise.