Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PropertyPtrTableReader.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
PropertyPtrTableReader
6
{
7
internal
readonly
int
NumberOfRows
;
8
9
private
readonly
bool
_IsPropertyTableRowRefSizeSmall
;
10
11
private
readonly
int
_PropertyOffset
;
12
13
internal
readonly
int
RowSize
;
14
15
internal
readonly
MemoryBlock
Block
;
16
17
internal
PropertyPtrTableReader
(
int
numberOfRows,
int
propertyTableRowRefSize,
MemoryBlock
containingBlock,
int
containingBlockOffset)
18
{
19
NumberOfRows
= numberOfRows;
20
_IsPropertyTableRowRefSizeSmall
= propertyTableRowRefSize == 2;
21
_PropertyOffset
= 0;
22
RowSize
=
_PropertyOffset
+ propertyTableRowRefSize;
23
Block
= containingBlock.
GetMemoryBlockAt
(containingBlockOffset,
RowSize
* numberOfRows);
24
}
25
26
internal
PropertyDefinitionHandle
GetPropertyFor
(
int
rowId)
27
{
28
int
num = (rowId - 1) *
RowSize
;
29
return
PropertyDefinitionHandle
.
FromRowId
(
Block
.
PeekReference
(num +
_PropertyOffset
,
_IsPropertyTableRowRefSizeSmall
));
30
}
31
}
System.Reflection.Internal
Definition
AbstractMemoryBlock.cs:4
System.Reflection.Metadata.Ecma335
Definition
ArrayShapeEncoder.cs:3
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
Definition
MemoryBlock.cs:11
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader._PropertyOffset
readonly int _PropertyOffset
Definition
PropertyPtrTableReader.cs:11
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader.Block
readonly MemoryBlock Block
Definition
PropertyPtrTableReader.cs:15
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader.PropertyPtrTableReader
PropertyPtrTableReader(int numberOfRows, int propertyTableRowRefSize, MemoryBlock containingBlock, int containingBlockOffset)
Definition
PropertyPtrTableReader.cs:17
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader.NumberOfRows
readonly int NumberOfRows
Definition
PropertyPtrTableReader.cs:7
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader.GetPropertyFor
PropertyDefinitionHandle GetPropertyFor(int rowId)
Definition
PropertyPtrTableReader.cs:26
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader.RowSize
readonly int RowSize
Definition
PropertyPtrTableReader.cs:13
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader._IsPropertyTableRowRefSizeSmall
readonly bool _IsPropertyTableRowRefSizeSmall
Definition
PropertyPtrTableReader.cs:9
System.Reflection.Metadata.Ecma335.PropertyPtrTableReader
Definition
PropertyPtrTableReader.cs:6
System.Reflection.Metadata.PropertyDefinitionHandle.FromRowId
static PropertyDefinitionHandle FromRowId(int rowId)
Definition
PropertyDefinitionHandle.cs:16
System.Reflection.Metadata.PropertyDefinitionHandle
Definition
PropertyDefinitionHandle.cs:4
source
System.Reflection.Metadata
System.Reflection.Metadata.Ecma335
PropertyPtrTableReader.cs
Generated by
1.10.0