private static void *__CopyValue(Foo.__Internal native) { var ret = Marshal.AllocHGlobal(4); *(Foo.__Internal *)ret = native; return(ret.ToPointer()); }
private Foo(Foo.__Internal native, bool skipVTables = false) : this(__CopyValue(native), skipVTables) { __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; }
internal static Foo __CreateInstance(Foo.__Internal native, bool skipVTables = false) { return(new Foo(native, skipVTables)); }