static void OverrideCloseFinish(GLib.GType gtype, CloseFinishNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("close_finish")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private bool InternalCloseFinish(GLib.IAsyncResult result) { CloseFinishNativeDelegate unmanaged = class_abi.BaseOverride <CloseFinishNativeDelegate>(this.LookupGType(), "close_finish"); if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr error = IntPtr.Zero; bool __result = unmanaged(this.Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error); return(__result); }
private bool InternalCloseFinish(GLib.IAsyncResult result) { CloseFinishNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("close_finish")); unmanaged = (CloseFinishNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseFinishNativeDelegate)); } if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr error = IntPtr.Zero; bool __result = unmanaged(this.Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error); return(__result); }
static void OverrideCloseFinish (GLib.GType gtype, CloseFinishNativeDelegate callback) { GIOStreamClass class_iface = GetClassStruct (gtype, false); class_iface.CloseFinish = callback; OverrideClassStruct (gtype, class_iface); }