internal unsafe static IRuntimeFieldInfo ResolveFieldHandleInternal(RuntimeModule module, int fieldToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
{
ModuleHandle.ValidateModulePointer(module);
if (!ModuleHandle.GetMetadataImport(module.GetNativeHandle()).IsValidToken(fieldToken))
{
throw new ArgumentOutOfRangeException("metadataToken", Environment.GetResourceString("Argument_InvalidToken", new object[]
{
fieldToken,
new ModuleHandle(module)
}));
}
int typeInstCount;
IntPtr[] array = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out typeInstCount);
int methodInstCount;
IntPtr[] array2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out methodInstCount);
fixed(IntPtr *ptr = array)
{
fixed(IntPtr *ptr2 = array2)
{
IRuntimeFieldInfo result = null;
ModuleHandle.ResolveField(module.GetNativeHandle(), fieldToken, ptr, typeInstCount, ptr2, methodInstCount, JitHelpers.GetObjectHandleOnStack <IRuntimeFieldInfo>(ref result));
GC.KeepAlive(typeInstantiationContext);
GC.KeepAlive(methodInstantiationContext);
return(result);
}
}
}