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
redirectionTableIMetadataTableThe table that is used for translating raw indices.
tableTableIndexThe table.
startRiduintThe starting row identifier.
endRiduintThe ending row identifier. This identifier is exclusive.
MetadataRange(TableIndex, uint, uint)
Initializes the range.
public MetadataRange(TableIndex table, uint startRid, uint endRid)
Parameters
tableTableIndexThe table.
startRiduintThe starting row identifier.
endRiduintThe ending row identifier. This identifier is exclusive.
Fields
Empty
Represents the empty metadata range.
public static readonly MetadataRange Empty
Field Value
Properties
Count
Gets the number of metadata rows this range spans.
public int Count { get; }
Property Value
EndRid
Gets the row identifier indicating the end of the range. The range excludes this row identifier.
public uint EndRid { get; }
Property Value
IsEmpty
Gets a value indicating whether the range is empty or not.
public bool IsEmpty { get; }
Property Value
IsRedirected
Gets a value indicating whether the range is associated to a redirection table.
[MemberNotNullWhen(true, "RedirectionTable")]
public bool IsRedirected { get; }
Property Value
RedirectionTable
Gets the table that is used for translating raw indices.
public IMetadataTable? RedirectionTable { get; }
Property Value
StartRid
Gets the first row identifier that this range includes.
public uint StartRid { get; }
Property Value
Table
Gets the index of the metadata table this range is targeting.
public TableIndex Table { get; }
Property Value
Methods
Equals(MetadataRange)
public bool Equals(MetadataRange other)
Parameters
otherMetadataRange
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetEnumerator()
Obtains an enumerator that enumerates all metadata tokens within the range.
public MetadataRange.Enumerator GetEnumerator()
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()