Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AssemblyTableReader.cs
Go to the documentation of this file.
2
4
5internal readonly struct AssemblyTableReader
6{
7 internal readonly int NumberOfRows;
8
9 private readonly bool _IsStringHeapRefSizeSmall;
10
11 private readonly bool _IsBlobHeapRefSizeSmall;
12
13 private readonly int _HashAlgIdOffset;
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 _PublicKeyOffset;
26
27 private readonly int _NameOffset;
28
29 private readonly int _CultureOffset;
30
31 internal readonly int RowSize;
32
33 internal readonly MemoryBlock Block;
34
35 internal AssemblyTableReader(int numberOfRows, int stringHeapRefSize, int blobHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset)
36 {
37 NumberOfRows = ((numberOfRows > 1) ? 1 : numberOfRows);
38 _IsStringHeapRefSizeSmall = stringHeapRefSize == 2;
39 _IsBlobHeapRefSizeSmall = blobHeapRefSize == 2;
47 _NameOffset = _PublicKeyOffset + blobHeapRefSize;
48 _CultureOffset = _NameOffset + stringHeapRefSize;
49 RowSize = _CultureOffset + stringHeapRefSize;
50 Block = containingBlock.GetMemoryBlockAt(containingBlockOffset, RowSize * numberOfRows);
51 }
52
57
62
67
72
77
82}
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
AssemblyTableReader(int numberOfRows, int stringHeapRefSize, int blobHeapRefSize, MemoryBlock containingBlock, int containingBlockOffset)
static StringHandle FromOffset(int heapOffset)