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

◆ GetTypeHelper()

static unsafe Type System.RuntimeTypeHandle.GetTypeHelper ( Type typeStart,
Type[] genericArgs,
IntPtr pModifiers,
int cModifiers )
inlinestaticpackage

Definition at line 86 of file RuntimeTypeHandle.cs.

87 {
89 if (genericArgs != null)
90 {
91 type = type.MakeGenericType(genericArgs);
92 }
93 if (cModifiers > 0)
94 {
95 int* ptr = (int*)pModifiers.ToPointer();
96 for (int i = 0; i < cModifiers; i++)
97 {
98 type = (((byte)Marshal.ReadInt32((IntPtr)ptr, i * 4) != 15) ? (((byte)Marshal.ReadInt32((IntPtr)ptr, i * 4) != 16) ? (((byte)Marshal.ReadInt32((IntPtr)ptr, i * 4) != 29) ? type.MakeArrayType(Marshal.ReadInt32((IntPtr)ptr, ++i * 4)) : type.MakeArrayType()) : type.MakeByRefType()) : type.MakePointerType());
99 }
100 }
101 return type;
102 }
static int ReadInt32(object ptr, int ofs)
Definition Marshal.cs:59

References System.Runtime.Serialization.Dictionary, System.Type.MakeGenericType(), System.Runtime.InteropServices.Marshal.ReadInt32(), and System.type.

Referenced by System.TypeNameParser.ConstructType().