internal rollback_hook_info(delegate_rollback func, object v) { _func = func; _user_data = v; _h = GCHandle.Alloc(this); }
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()); } }
internal void free() { _func = null; _user_data = null; _h.Free(); }
void ISQLite3Provider.sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v) { throw new Exception(GRIPE); }
public rollback_hook_info(delegate_rollback func, object v) { _func = func; _user_data = v; }
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); } }
public static void rollback_hook(this sqlite3 db, delegate_rollback f, object v) { raw.sqlite3_rollback_hook(db, f, v); }
public void sqlite3_rollback_hook(IntPtr db, delegate_rollback func, object v) => throw new NotImplementedException();
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()); } }