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
IMetadataTableThe table that is used for translating raw indices.
table
TableIndexThe table.
startRid
uintThe starting row identifier.
endRid
uintThe ending row identifier. This identifier is exclusive.
MetadataRange(TableIndex, uint, uint)
Initializes the range.
public MetadataRange(TableIndex table, uint startRid, uint endRid)
Parameters
table
TableIndexThe table.
startRid
uintThe starting row identifier.
endRid
uintThe 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.
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)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(MetadataRange other)
Parameters
other
MetadataRangeAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetEnumerator()
Obtains an enumerator that enumerates all metadata tokens within the range.
public MetadataRange.Enumerator GetEnumerator()
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.