Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AssemblyRefTableReader.cs
Go to the documentation of this file.
2
4
5internal readonly struct AssemblyRefTableReader
6{
7 internal readonly int NumberOfNonVirtualRows;
8
9 internal readonly int NumberOfVirtualRows;
10
11 private readonly bool _IsStringHeapRefSizeSmall;
12
13 private readonly bool _IsBlobHeapRefSizeSmall;
14
15 private readonly int _MajorVersionOffset;
16
17 private readonly int _MinorVersionOffset;
18
19 private readonly int _BuildNumberOffset;
20
21 private readonly int _RevisionNumberOffset;
22
23 private readonly int _FlagsOffset;
24
25 private readonly int _PublicKeyOrTokenOffset;
26
27 private readonly int _NameOffset;
28
29 private readonly int _CultureOffset;
30
31 private readonly int _HashValueOffset;
32
33 internal readonly int RowSize;
34
35 internal readonly MemoryBlock Block;
36
37 internal AssemblyRefTableReader(int numberOfRows, int stringHeapRefSize, int blobHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset, MetadataKind metadataKind)
38 {
39 NumberOfNonVirtualRows = numberOfRows;
40 NumberOfVirtualRows = ((metadataKind != 0) ? 6 : 0);
41 _IsStringHeapRefSizeSmall = stringHeapRefSize == 2;
42 _IsBlobHeapRefSizeSmall = blobHeapRefSize == 2;
49 _NameOffset = _PublicKeyOrTokenOffset + blobHeapRefSize;
50 _CultureOffset = _NameOffset + stringHeapRefSize;
51 _HashValueOffset = _CultureOffset + stringHeapRefSize;
52 RowSize = _HashValueOffset + blobHeapRefSize;
53 Block = containingBlock.GetMemoryBlockAt(containingBlockOffset, RowSize * numberOfRows);
54 }
55
56 internal Version GetVersion(int rowId)
57 {
58 int num = (rowId - 1) * RowSize;
60 }
61
62 internal AssemblyFlags GetFlags(int rowId)
63 {
64 int num = (rowId - 1) * RowSize;
66 }
67
68 internal BlobHandle GetPublicKeyOrToken(int rowId)
69 {
70 int num = (rowId - 1) * RowSize;
72 }
73
74 internal StringHandle GetName(int rowId)
75 {
76 int num = (rowId - 1) * RowSize;
78 }
79
80 internal StringHandle GetCulture(int rowId)
81 {
82 int num = (rowId - 1) * RowSize;
84 }
85
86 internal BlobHandle GetHashValue(int rowId)
87 {
88 int num = (rowId - 1) * RowSize;
90 }
91}
unsafe ushort PeekUInt16(int offset)
unsafe MemoryBlock GetMemoryBlockAt(int offset, int length)
int PeekHeapReference(int offset, bool smallRefSize)
unsafe uint PeekUInt32(int offset)
static BlobHandle FromOffset(int heapOffset)
Definition BlobHandle.cs:34
AssemblyRefTableReader(int numberOfRows, int stringHeapRefSize, int blobHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset, MetadataKind metadataKind)
static StringHandle FromOffset(int heapOffset)