Ejemplo n.º 1
0
        private void InternalSocketEvent(out GLib.SocketListenerEvent evnt, GLib.Socket socket)
        {
            SocketEventNativeDelegate unmanaged = class_abi.BaseOverride <SocketEventNativeDelegate>(this.LookupGType(), "event");

            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            int native_evnt;

            unmanaged(this.Handle, out native_evnt, socket == null ? IntPtr.Zero : socket.Handle);
            evnt = (GLib.SocketListenerEvent)native_evnt;
        }
Ejemplo n.º 2
0
        private void InternalEvent(out GLib.SocketListenerEvent evnt, GLib.Socket socket)
        {
            EventNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("event"));
                unmanaged = (EventNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(EventNativeDelegate));
            }
            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            int native_evnt;

            unmanaged(this.Handle, out native_evnt, socket == null ? IntPtr.Zero : socket.Handle);
            evnt = (GLib.SocketListenerEvent)native_evnt;
        }
Ejemplo n.º 3
0
 protected virtual void OnSocketEvent(out GLib.SocketListenerEvent evnt, GLib.Socket socket)
 {
     InternalSocketEvent(out evnt, socket);
 }