public static unsafe Object LoadValueTypeField(IntPtr address, RuntimeTypeHandle fieldType) { return(RuntimeImports.RhBox(fieldType.ToEETypePtr(), *(void **)&address)); }
private static object DynamicInvokeBoxIntoNonNullable(object actualBoxedNullable) { // grab the pointer to data, box using the EEType of the actualBoxedNullable, and then return the boxed object return(RuntimeImports.RhBox(actualBoxedNullable.EETypePtr, ref actualBoxedNullable.GetRawData())); }
public static unsafe object Box(RuntimeTypeHandle type, IntPtr address) { return(RuntimeImports.RhBox(type.ToEETypePtr(), address.ToPointer())); }
public static unsafe object LoadValueTypeField(IntPtr address, RuntimeTypeHandle fieldType) { return(RuntimeImports.RhBox(fieldType.ToEETypePtr(), ref *(byte *)address)); }