95 {
102 if (typeInstantiationContext != null && typeInstantiationContext.Length != 0)
103 {
104 typeInstantiationContext = (RuntimeTypeHandle[])typeInstantiationContext.Clone();
105 array = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out
length);
106 }
107 if (methodInstantiationContext != null && methodInstantiationContext.Length != 0)
108 {
109 methodInstantiationContext = (RuntimeTypeHandle[])methodInstantiationContext.Clone();
110 array2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out
length2);
111 }
112 fixed (IntPtr* typeInstArgs =
array)
113 {
114 fixed (IntPtr* methodInstArgs = array2)
115 {
116 try
117 {
118 RuntimeType o = null;
120 GC.KeepAlive(typeInstantiationContext);
121 GC.KeepAlive(methodInstantiationContext);
122 return new RuntimeTypeHandle(o);
123 }
124 catch (Exception)
125 {
127 {
128 throw new ArgumentOutOfRangeException(
"typeToken", SR.Format(SR.Argument_InvalidToken, typeToken,
new ModuleHandle(module)));
129 }
130 throw;
131 }
132 }
133 }
134 }
static void ValidateModulePointer(RuntimeModule module)
RuntimeModule GetRuntimeModule()
ModuleHandle(RuntimeModule module)
static unsafe void ResolveType(QCallModule module, int typeToken, IntPtr *typeInstArgs, int typeInstCount, IntPtr *methodInstArgs, int methodInstCount, ObjectHandleOnStack type)
static MetadataImport GetMetadataImport(RuntimeModule module)