Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MethodTable.cs
Go to the documentation of this file.
1
using
System.Runtime.InteropServices
;
2
3
namespace
System.Runtime.CompilerServices
;
4
5
[StructLayout(
LayoutKind
.Explicit)]
6
internal
struct
MethodTable
7
{
8
[FieldOffset(0)]
9
public
ushort
ComponentSize
;
10
11
[FieldOffset(0)]
12
private
uint
Flags
;
13
14
[FieldOffset(4)]
15
public
uint
BaseSize
;
16
17
[FieldOffset(14)]
18
public
ushort
InterfaceCount
;
19
20
[FieldOffset(16)]
21
public
unsafe
MethodTable
*
ParentMethodTable
;
22
23
[FieldOffset(48)]
24
public
unsafe
void
*
ElementType
;
25
26
[FieldOffset(56)]
27
public
unsafe
MethodTable
**
InterfaceMap
;
28
29
public
bool
HasComponentSize
=> (Flags & 0x80000000u) != 0;
30
31
public
bool
ContainsGCPointers
=> (Flags & 0x1000000) != 0;
32
33
public
bool
NonTrivialInterfaceCast
=> (Flags & 0x406C0000) != 0;
34
35
public
unsafe
bool
IsMultiDimensionalArray
36
{
37
[MethodImpl(
MethodImplOptions
.AggressiveInlining)]
38
get
39
{
40
return
BaseSize
> (uint)(3 *
sizeof
(
IntPtr
));
41
}
42
}
43
44
public
unsafe
int
MultiDimensionalArrayRank
45
{
46
[MethodImpl(
MethodImplOptions
.AggressiveInlining)]
47
get
48
{
49
return
(
int
)((uint)((
int
)
BaseSize
- 3 *
sizeof
(
IntPtr
)) / 8u);
50
}
51
}
52
}
System.Runtime.CompilerServices.MethodImplOptions
MethodImplOptions
Definition
MethodImplOptions.cs:5
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.Runtime.InteropServices.LayoutKind
LayoutKind
Definition
LayoutKind.cs:4
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System.IntPtr
Definition
IntPtr.cs:14
System.Runtime.CompilerServices.MethodTable.InterfaceCount
ushort InterfaceCount
Definition
MethodTable.cs:18
System.Runtime.CompilerServices.MethodTable.ComponentSize
ushort ComponentSize
Definition
MethodTable.cs:9
System.Runtime.CompilerServices.MethodTable.MultiDimensionalArrayRank
unsafe int MultiDimensionalArrayRank
Definition
MethodTable.cs:45
System.Runtime.CompilerServices.MethodTable.ElementType
unsafe void * ElementType
Definition
MethodTable.cs:24
System.Runtime.CompilerServices.MethodTable.NonTrivialInterfaceCast
bool NonTrivialInterfaceCast
Definition
MethodTable.cs:33
System.Runtime.CompilerServices.MethodTable.IsMultiDimensionalArray
unsafe bool IsMultiDimensionalArray
Definition
MethodTable.cs:36
System.Runtime.CompilerServices.MethodTable.InterfaceMap
unsafe MethodTable ** InterfaceMap
Definition
MethodTable.cs:27
System.Runtime.CompilerServices.MethodTable.ParentMethodTable
unsafe MethodTable * ParentMethodTable
Definition
MethodTable.cs:21
System.Runtime.CompilerServices.MethodTable.ContainsGCPointers
bool ContainsGCPointers
Definition
MethodTable.cs:31
System.Runtime.CompilerServices.MethodTable.BaseSize
uint BaseSize
Definition
MethodTable.cs:15
System.Runtime.CompilerServices.MethodTable.Flags
uint Flags
Definition
MethodTable.cs:12
System.Runtime.CompilerServices.MethodTable.HasComponentSize
bool HasComponentSize
Definition
MethodTable.cs:29
System.Runtime.CompilerServices.MethodTable
Definition
MethodTable.cs:7
source
System.Private.CoreLib
System.Runtime.CompilerServices
MethodTable.cs
Generated by
1.10.0