Table of Contents

Struct MetadataRange

Namespace
AsmResolver.PE.DotNet.Metadata.Tables
Assembly
AsmResolver.PE.dll

Represents a range of metadata tokens, indicated by a starting and ending row identifier within a metadata table.

public readonly struct MetadataRange : IEnumerable<MetadataToken>, IEnumerable, IEquatable<MetadataRange>
Implements
Inherited Members

Constructors

MetadataRange(IMetadataTable, TableIndex, uint, uint)

Initializes the range.

public MetadataRange(IMetadataTable redirectionTable, TableIndex table, uint startRid, uint endRid)

Parameters

redirectionTable IMetadataTable

The table that is used for translating raw indices.

table TableIndex

The table.

startRid uint

The starting row identifier.

endRid uint

The ending row identifier. This identifier is exclusive.

MetadataRange(TableIndex, uint, uint)

Initializes the range.

public MetadataRange(TableIndex table, uint startRid, uint endRid)

Parameters

table TableIndex

The table.

startRid uint

The starting row identifier.

endRid uint

The ending row identifier. This identifier is exclusive.

Fields

Empty

Represents the empty metadata range.

public static readonly MetadataRange Empty

Field Value

MetadataRange

Properties

Count

Gets the number of metadata rows this range spans.

public int Count { get; }

Property Value

int

EndRid

Gets the row identifier indicating the end of the range. The range excludes this row identifier.

public uint EndRid { get; }

Property Value

uint

IsEmpty

Gets a value indicating whether the range is empty or not.

public bool IsEmpty { get; }

Property Value

bool

IsRedirected

Gets a value indicating whether the range is associated to a redirection table.

[MemberNotNullWhen(true, "RedirectionTable")]
public bool IsRedirected { get; }

Property Value

bool

RedirectionTable

Gets the table that is used for translating raw indices.

public IMetadataTable? RedirectionTable { get; }

Property Value

IMetadataTable

StartRid

Gets the first row identifier that this range includes.

public uint StartRid { get; }

Property Value

uint

Table

Gets the index of the metadata table this range is targeting.

public TableIndex Table { get; }

Property Value

TableIndex

Methods

Equals(MetadataRange)

public bool Equals(MetadataRange other)

Parameters

other MetadataRange

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetEnumerator()

Obtains an enumerator that enumerates all metadata tokens within the range.

public MetadataRange.Enumerator GetEnumerator()

Returns

MetadataRange.Enumerator

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string