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

◆ ConvertToTypeHandleArray()

static RuntimeTypeHandle[] System.Reflection.RuntimeModule.ConvertToTypeHandleArray ( Type[] genericArguments)
inlinestaticprivateinherited

Definition at line 97 of file RuntimeModule.cs.

98 {
99 if (genericArguments == null)
100 {
101 return null;
102 }
103 int num = genericArguments.Length;
104 RuntimeTypeHandle[] array = new RuntimeTypeHandle[num];
105 for (int i = 0; i < num; i++)
106 {
108 if (type == null)
109 {
110 throw new ArgumentException(SR.Argument_InvalidGenericInstArray);
111 }
112 type = type.UnderlyingSystemType;
113 if (type == null)
114 {
115 throw new ArgumentException(SR.Argument_InvalidGenericInstArray);
116 }
117 if (!(type is RuntimeType))
118 {
119 throw new ArgumentException(SR.Argument_InvalidGenericInstArray);
120 }
121 array[i] = type.GetTypeHandleInternal();
122 }
123 return array;
124 }

References System.SR.Argument_InvalidGenericInstArray, System.array, and System.type.

Referenced by System.Reflection.RuntimeModule.ResolveField(), System.Reflection.RuntimeModule.ResolveMethod(), and System.Reflection.RuntimeModule.ResolveType().