Esempio n. 1
0
        private void SetProfileCallback(SQLiteTraceV2Callback callback)
        {
            if (callback != null && !m_handle.IsAllocated)
            {
                m_handle = GCHandle.Alloc(this);
            }
            else if (callback == null && m_handle.IsAllocated)
            {
                m_handle.Free();
            }

            NativeMethods.sqlite3_trace_v2(m_db, SQLiteTraceEvents.SQLITE_TRACE_PROFILE, callback, m_handle.IsAllocated ? GCHandle.ToIntPtr(m_handle) : IntPtr.Zero);
        }
 public static extern int sqlite3_trace_v2(SqliteDatabaseHandle db, SQLiteTraceEvents eventsMask, SQLiteTraceV2Callback callback, IntPtr userData);