static void OverrideRequestCertificateAsync(GLib.GType gtype, RequestCertificateAsyncNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("request_certificate_async")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private void InternalRequestCertificateAsync(GLib.TlsConnection connection, GLib.TlsCertificateRequestFlags flags, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) { RequestCertificateAsyncNativeDelegate unmanaged = class_abi.BaseOverride <RequestCertificateAsyncNativeDelegate>(this.LookupGType(), "request_certificate_async"); if (unmanaged == null) { return; } GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); unmanaged(this.Handle, connection == null ? IntPtr.Zero : connection.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }
private void InternalRequestCertificateAsync(GLib.TlsConnection connection, GLib.TlsCertificateRequestFlags flags, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) { RequestCertificateAsyncNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("request_certificate_async")); unmanaged = (RequestCertificateAsyncNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(RequestCertificateAsyncNativeDelegate)); } if (unmanaged == null) { return; } GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb); cb_wrapper.PersistUntilCalled(); unmanaged(this.Handle, connection == null ? IntPtr.Zero : connection.Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero); }