Example #1
0
        internal rollback_hook_info(delegate_rollback func, object v)
        {
            _func      = func;
            _user_data = v;

            _h = GCHandle.Alloc(this);
        }
Example #2
0
        void ISQLite3Provider.sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v)
        {
            if (_rollback_hook != null)
            {
                // TODO maybe turn off the hook here, for now
                _rollback_hook.free();
                _rollback_hook = null;
            }

            if (func != null)
            {
                _rollback_hook = new rollback_hook_info(func, v);
                SQLite3RuntimeProvider.sqlite3_rollback_hook(db.ToInt64(), Marshal.GetFunctionPointerForDelegate(new callback_rollback(rollback_hook_bridge)).ToInt64(), _rollback_hook.ptr.ToInt64());
            }
            else
            {
                SQLite3RuntimeProvider.sqlite3_rollback_hook(db.ToInt64(), IntPtr.Zero.ToInt64(), IntPtr.Zero.ToInt64());
            }
        }
Example #3
0
 internal void free()
 {
     _func      = null;
     _user_data = null;
     _h.Free();
 }
Example #4
0
 void ISQLite3Provider.sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v)
 {
     throw new Exception(GRIPE);
 }
Example #5
0
 public rollback_hook_info(delegate_rollback func, object v)
 {
     _func      = func;
     _user_data = v;
 }
Example #6
0
 static public void sqlite3_rollback_hook(sqlite3 db, delegate_rollback f, object v)
 {
     _imp.sqlite3_rollback_hook(db.ptr, f, v);
 }
        void ISQLite3Provider.sqlite3_rollback_hook (IntPtr db, delegate_rollback func, object v)
        {
            var info = hooks.getOrCreateFor (db);
            if (info.rollback != null) {
                // TODO maybe turn off the hook here, for now
                info.rollback.free ();
                info.rollback = null;
            }

            if (func != null) {
                info.rollback = new rollback_hook_info (func, v);
                NativeMethods.sqlite3_rollback_hook (db, rollback_hook_bridge, info.rollback.ptr);
            } else {
                NativeMethods.sqlite3_rollback_hook (db, null, IntPtr.Zero);
            }
        }
Example #8
0
 static public void sqlite3_rollback_hook(sqlite3 db, delegate_rollback f, object v)
 {
     _imp.sqlite3_rollback_hook(db.ptr, f, v);
 }
Example #9
0
 public static void rollback_hook(this sqlite3 db, delegate_rollback f, object v)
 {
     raw.sqlite3_rollback_hook(db, f, v);
 }
Example #10
0
 internal void free()
 {
     _func = null;
     _user_data = null;
     _h.Free();
 }
Example #11
0
        internal rollback_hook_info(delegate_rollback func, object v)
        {
            _func = func;
            _user_data = v;

            _h = GCHandle.Alloc(this);
        }
 public void sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v) => throw new NotImplementedException();
Example #13
0
        void ISQLite3Provider.sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v)
        {
            if (_rollback_hook != null)
            {
                // TODO maybe turn off the hook here, for now
                _rollback_hook.free();
                _rollback_hook = null;
            }

            if (func != null)
            {
                _rollback_hook = new rollback_hook_info(func, v);
                NativeMethods.sqlite3_rollback_hook(db, rollback_hook_bridge, _rollback_hook.ptr);
            }
            else
            {
                NativeMethods.sqlite3_rollback_hook(db, null, IntPtr.Zero);
            }
        }
        void ISQLite3Provider.sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v)
        {
		var info = hooks.getOrCreateFor(db);
            if (info.rollback != null)
            {
                // TODO maybe turn off the hook here, for now
                info.rollback.free();
                info.rollback = null;
            }

            if (func != null)
            {
                info.rollback = new rollback_hook_info(func, v);
                SQLite3RuntimeProvider.sqlite3_rollback_hook(db.ToInt64(), Marshal.GetFunctionPointerForDelegate(rollback_hook_bridge).ToInt64(), info.rollback.ptr.ToInt64());
            }
            else
            {
                SQLite3RuntimeProvider.sqlite3_rollback_hook(db.ToInt64(), IntPtr.Zero.ToInt64(), IntPtr.Zero.ToInt64());
            }
        }
Example #15
0
        void ISQLite3Provider.sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v)
        {
	    throw new Exception(GRIPE);
        }
        void ISQLite3Provider.sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v)
        {
            if (_rollback_hook != null)
            {
                // TODO maybe turn off the hook here, for now
                _rollback_hook.free();
                _rollback_hook = null;
            }

            if (func != null)
            {
                _rollback_hook = new rollback_hook_info(func, v);
                SQLite3RuntimeProvider.sqlite3_rollback_hook(db.ToInt64(), Marshal.GetFunctionPointerForDelegate(new callback_rollback(rollback_hook_bridge)).ToInt64(), _rollback_hook.ptr.ToInt64());
            }
            else
            {
                SQLite3RuntimeProvider.sqlite3_rollback_hook(db.ToInt64(), IntPtr.Zero.ToInt64(), IntPtr.Zero.ToInt64());
            }
        }