Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MethodDebugInformationTableReader.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
MethodDebugInformationTableReader
6
{
7
internal
readonly
int
NumberOfRows
;
8
9
private
readonly
bool
_isDocumentRefSmall
;
10
11
private
readonly
bool
_isBlobHeapRefSizeSmall
;
12
13
private
readonly
int
_sequencePointsOffset
;
14
15
internal
readonly
int
RowSize
;
16
17
internal
readonly
MemoryBlock
Block
;
18
19
internal
MethodDebugInformationTableReader
(
int
numberOfRows,
int
documentRefSize,
int
blobHeapRefSize,
MemoryBlock
containingBlock,
int
containingBlockOffset)
20
{
21
NumberOfRows
= numberOfRows;
22
_isDocumentRefSmall
= documentRefSize == 2;
23
_isBlobHeapRefSizeSmall
= blobHeapRefSize == 2;
24
_sequencePointsOffset
= documentRefSize;
25
RowSize
=
_sequencePointsOffset
+ blobHeapRefSize;
26
Block
= containingBlock.
GetMemoryBlockAt
(containingBlockOffset,
RowSize
* numberOfRows);
27
}
28
29
internal
DocumentHandle
GetDocument
(
MethodDebugInformationHandle
handle
)
30
{
31
int
offset
= (handle.RowId - 1) *
RowSize
;
32
return
DocumentHandle
.
FromRowId
(
Block
.
PeekReference
(
offset
,
_isDocumentRefSmall
));
33
}
34
35
internal
BlobHandle
GetSequencePoints
(
MethodDebugInformationHandle
handle
)
36
{
37
int
num = (handle.RowId - 1) *
RowSize
;
38
return
BlobHandle
.
FromOffset
(
Block
.
PeekHeapReference
(num +
_sequencePointsOffset
,
_isBlobHeapRefSizeSmall
));
39
}
40
}
System.Reflection.Internal
Definition
AbstractMemoryBlock.cs:4
System.Reflection.Metadata.Ecma335
Definition
ArrayShapeEncoder.cs:3
System.ExceptionArgument.offset
@ offset
System.ExceptionArgument.handle
@ handle
System.Reflection.Internal.MemoryBlock.PeekReference
int PeekReference(int offset, bool smallRefSize)
Definition
MemoryBlock.cs:187
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.BlobHandle.FromOffset
static BlobHandle FromOffset(int heapOffset)
Definition
BlobHandle.cs:34
System.Reflection.Metadata.BlobHandle
Definition
BlobHandle.cs:6
System.Reflection.Metadata.DocumentHandle.FromRowId
static DocumentHandle FromRowId(int rowId)
Definition
DocumentHandle.cs:16
System.Reflection.Metadata.DocumentHandle
Definition
DocumentHandle.cs:4
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader._isBlobHeapRefSizeSmall
readonly bool _isBlobHeapRefSizeSmall
Definition
MethodDebugInformationTableReader.cs:11
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader.GetDocument
DocumentHandle GetDocument(MethodDebugInformationHandle handle)
Definition
MethodDebugInformationTableReader.cs:29
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader.Block
readonly MemoryBlock Block
Definition
MethodDebugInformationTableReader.cs:17
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader.MethodDebugInformationTableReader
MethodDebugInformationTableReader(int numberOfRows, int documentRefSize, int blobHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset)
Definition
MethodDebugInformationTableReader.cs:19
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader._isDocumentRefSmall
readonly bool _isDocumentRefSmall
Definition
MethodDebugInformationTableReader.cs:9
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader.NumberOfRows
readonly int NumberOfRows
Definition
MethodDebugInformationTableReader.cs:7
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader.RowSize
readonly int RowSize
Definition
MethodDebugInformationTableReader.cs:15
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader.GetSequencePoints
BlobHandle GetSequencePoints(MethodDebugInformationHandle handle)
Definition
MethodDebugInformationTableReader.cs:35
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader._sequencePointsOffset
readonly int _sequencePointsOffset
Definition
MethodDebugInformationTableReader.cs:13
System.Reflection.Metadata.Ecma335.MethodDebugInformationTableReader
Definition
MethodDebugInformationTableReader.cs:6
System.Reflection.Metadata.MethodDebugInformationHandle
Definition
MethodDebugInformationHandle.cs:4
source
System.Reflection.Metadata
System.Reflection.Metadata.Ecma335
MethodDebugInformationTableReader.cs
Generated by
1.10.0