Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FieldMarshalTableReader()

System.Reflection.Metadata.Ecma335.FieldMarshalTableReader.FieldMarshalTableReader ( int numberOfRows,
bool declaredSorted,
int hasFieldMarshalRefSize,
int blobHeapRefSize,
MemoryBlock containingBlock,
int containingBlockOffset )
inlinepackage

Definition at line 21 of file FieldMarshalTableReader.cs.

22 {
23 NumberOfRows = numberOfRows;
24 _IsHasFieldMarshalRefSizeSmall = hasFieldMarshalRefSize == 2;
25 _IsBlobHeapRefSizeSmall = blobHeapRefSize == 2;
26 _ParentOffset = 0;
27 _NativeTypeOffset = _ParentOffset + hasFieldMarshalRefSize;
28 RowSize = _NativeTypeOffset + blobHeapRefSize;
29 Block = containingBlock.GetMemoryBlockAt(containingBlockOffset, RowSize * numberOfRows);
30 if (!declaredSorted && !CheckSorted())
31 {
32 Throw.TableNotSorted(TableIndex.FieldMarshal);
33 }
34 }
unsafe MemoryBlock GetMemoryBlockAt(int offset, int length)

References System.Reflection.Metadata.Ecma335.FieldMarshalTableReader._IsBlobHeapRefSizeSmall, System.Reflection.Metadata.Ecma335.FieldMarshalTableReader._IsHasFieldMarshalRefSizeSmall, System.Reflection.Metadata.Ecma335.FieldMarshalTableReader._NativeTypeOffset, System.Reflection.Metadata.Ecma335.FieldMarshalTableReader._ParentOffset, System.Reflection.Metadata.Ecma335.FieldMarshalTableReader.Block, System.Reflection.Metadata.Ecma335.FieldMarshalTableReader.CheckSorted(), System.Reflection.Internal.MemoryBlock.GetMemoryBlockAt(), System.Reflection.Metadata.Ecma335.FieldMarshalTableReader.NumberOfRows, System.Reflection.Metadata.Ecma335.FieldMarshalTableReader.RowSize, and System.Reflection.Throw.TableNotSorted().