static void OverrideGetEtag(GLib.GType gtype, GetEtagNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_etag")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private string InternalGetEtag() { GetEtagNativeDelegate unmanaged = class_abi.BaseOverride <GetEtagNativeDelegate>(this.LookupGType(), "get_etag"); if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle); return(GLib.Marshaller.PtrToStringGFree(__result)); }
private string InternalGetEtag() { GetEtagNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_etag")); unmanaged = (GetEtagNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetEtagNativeDelegate)); } if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle); return(GLib.Marshaller.PtrToStringGFree(__result)); }
static void OverrideGetEtag (GLib.GType gtype, GetEtagNativeDelegate callback) { GFileIOStreamClass class_iface = GetClassStruct (gtype, false); class_iface.GetEtag = callback; OverrideClassStruct (gtype, class_iface); }