Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ModuleRefTableReader.cs
Go to the documentation of this file.
1
using
System.Reflection.Internal
;
2
3
namespace
System.Reflection.Metadata.Ecma335
;
4
5
internal
readonly
struct
ModuleRefTableReader
6
{
7
internal
readonly
int
NumberOfRows
;
8
9
private
readonly
bool
_IsStringHeapRefSizeSmall
;
10
11
private
readonly
int
_NameOffset
;
12
13
internal
readonly
int
RowSize
;
14
15
internal
readonly
MemoryBlock
Block
;
16
17
internal
ModuleRefTableReader
(
int
numberOfRows,
int
stringHeapRefSize,
MemoryBlock
containingBlock,
int
containingBlockOffset)
18
{
19
NumberOfRows
= numberOfRows;
20
_IsStringHeapRefSizeSmall
= stringHeapRefSize == 2;
21
_NameOffset
= 0;
22
RowSize
=
_NameOffset
+ stringHeapRefSize;
23
Block
= containingBlock.
GetMemoryBlockAt
(containingBlockOffset,
RowSize
* numberOfRows);
24
}
25
26
internal
StringHandle
GetName
(
ModuleReferenceHandle
handle
)
27
{
28
int
num = (handle.RowId - 1) *
RowSize
;
29
return
StringHandle
.
FromOffset
(
Block
.
PeekHeapReference
(num +
_NameOffset
,
_IsStringHeapRefSizeSmall
));
30
}
31
}
System.Reflection.Internal
Definition
AbstractMemoryBlock.cs:4
System.Reflection.Metadata.Ecma335
Definition
ArrayShapeEncoder.cs:3
System.ExceptionArgument.handle
@ handle
System.Reflection.Internal.MemoryBlock.GetMemoryBlockAt
unsafe MemoryBlock GetMemoryBlockAt(int offset, int length)
Definition
MemoryBlock.cs:102
System.Reflection.Internal.MemoryBlock.PeekHeapReference
int PeekHeapReference(int offset, bool smallRefSize)
Definition
MemoryBlock.cs:201
System.Reflection.Internal.MemoryBlock
Definition
MemoryBlock.cs:11
System.Reflection.Metadata.Ecma335.ModuleRefTableReader.RowSize
readonly int RowSize
Definition
ModuleRefTableReader.cs:13
System.Reflection.Metadata.Ecma335.ModuleRefTableReader._NameOffset
readonly int _NameOffset
Definition
ModuleRefTableReader.cs:11
System.Reflection.Metadata.Ecma335.ModuleRefTableReader.Block
readonly MemoryBlock Block
Definition
ModuleRefTableReader.cs:15
System.Reflection.Metadata.Ecma335.ModuleRefTableReader.NumberOfRows
readonly int NumberOfRows
Definition
ModuleRefTableReader.cs:7
System.Reflection.Metadata.Ecma335.ModuleRefTableReader._IsStringHeapRefSizeSmall
readonly bool _IsStringHeapRefSizeSmall
Definition
ModuleRefTableReader.cs:9
System.Reflection.Metadata.Ecma335.ModuleRefTableReader.ModuleRefTableReader
ModuleRefTableReader(int numberOfRows, int stringHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset)
Definition
ModuleRefTableReader.cs:17
System.Reflection.Metadata.Ecma335.ModuleRefTableReader.GetName
StringHandle GetName(ModuleReferenceHandle handle)
Definition
ModuleRefTableReader.cs:26
System.Reflection.Metadata.Ecma335.ModuleRefTableReader
Definition
ModuleRefTableReader.cs:6
System.Reflection.Metadata.ModuleReferenceHandle
Definition
ModuleReferenceHandle.cs:4
System.Reflection.Metadata.StringHandle.FromOffset
static StringHandle FromOffset(int heapOffset)
Definition
StringHandle.cs:98
System.Reflection.Metadata.StringHandle
Definition
StringHandle.cs:6
source
System.Reflection.Metadata
System.Reflection.Metadata.Ecma335
ModuleRefTableReader.cs
Generated by
1.10.0