예제 #1
0
        internal static void visit(IntPtr gcHandlePtr, out int __retval, IntPtr info, out int info_release, int count, int total)
        {
            var self = (CfxWebPluginInfoVisitor)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                __retval     = default(int);
                info_release = 1;
                return;
            }
            var e = new CfxWebPluginInfoVisitorVisitEventArgs(info, count, total);

            self.m_Visit?.Invoke(self, e);
            e.m_isInvalid = true;
            info_release  = e.m_info_wrapped == null? 1 : 0;
            __retval      = e.m_returnValue ? 1 : 0;
        }
예제 #2
0
        internal static void visit(IntPtr gcHandlePtr, out int __retval, IntPtr info, int count, int total)
        {
            var self = (CfxWebPluginInfoVisitor)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null)
            {
                __retval = default(int);
                return;
            }
            var e            = new CfxWebPluginInfoVisitorVisitEventArgs(info, count, total);
            var eventHandler = self.m_Visit;

            if (eventHandler != null)
            {
                eventHandler(self, e);
            }
            e.m_isInvalid = true;
            if (e.m_info_wrapped == null)
            {
                CfxApi.cfx_release(e.m_info);
            }
            __retval = e.m_returnValue ? 1 : 0;
        }