static void OverrideNextFinish(GLib.GType gtype, NextFinishNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("next_finish")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private GLib.SocketAddress InternalNextFinish(GLib.IAsyncResult result) { NextFinishNativeDelegate unmanaged = class_abi.BaseOverride <NextFinishNativeDelegate>(this.LookupGType(), "next_finish"); if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr error = IntPtr.Zero; IntPtr __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(GLib.Object.GetObject(__result) as GLib.SocketAddress); }
private GLib.SocketAddress InternalNextFinish(GLib.IAsyncResult result) { NextFinishNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("next_finish")); unmanaged = (NextFinishNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NextFinishNativeDelegate)); } if (unmanaged == null) { throw new InvalidOperationException("No base method to invoke"); } IntPtr error = IntPtr.Zero; IntPtr __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(GLib.Object.GetObject(__result) as GLib.SocketAddress); }
static void OverrideNextFinish (GLib.GType gtype, NextFinishNativeDelegate callback) { GSocketAddressEnumeratorClass class_iface = GetClassStruct (gtype, false); class_iface.NextFinish = callback; OverrideClassStruct (gtype, class_iface); }