コード例 #1
0
        internal authorizer_hook_info(delegate_authorizer func, object v)
        {
            _func      = func;
            _user_data = v;

            _h = GCHandle.Alloc(this);
        }
コード例 #2
0
 internal void free()
 {
     _func      = null;
     _user_data = null;
     _h.Free();
 }
コード例 #3
0
 int ISQLite3Provider.sqlite3_set_authorizer(IntPtr db, delegate_authorizer func, object v)
 {
     throw new Exception(GRIPE);
 }
コード例 #4
0
 static public int sqlite3_set_authorizer(sqlite3 db, delegate_authorizer authorizer, object user_data)
 {
     return(_imp.sqlite3_set_authorizer(db.ptr, authorizer, user_data));
 }
コード例 #5
0
ファイル: callbacks.cs プロジェクト: medicomp/SQLitePCL.raw
 public authorizer_hook_info(delegate_authorizer func, object v)
 {
     _func      = func;
     _user_data = v;
 }
コード例 #6
0
        int ISQLite3Provider.sqlite3_set_authorizer (IntPtr db, delegate_authorizer func, object v)
        {
            var info = hooks.getOrCreateFor (db);
            if (info.authorizer != null) {
                // TODO maybe turn off the hook here, for now
                info.authorizer.free ();
                info.authorizer = null;
            }

            if (func != null) {
                info.authorizer = new authorizer_hook_info (func, v);
                return NativeMethods.sqlite3_set_authorizer (db, authorizer_hook_bridge, info.authorizer.ptr);
            } else {
                return NativeMethods.sqlite3_set_authorizer (db, null, IntPtr.Zero);
            }
        }
コード例 #7
0
 public int sqlite3_set_authorizer(IntPtr db, delegate_authorizer authorizer, object user_data) => throw new NotImplementedException();
コード例 #8
0
        int ISQLite3Provider.sqlite3_set_authorizer(IntPtr db, delegate_authorizer func, object v)
        {
		var info = hooks.getOrCreateFor(db);
            if (info.authorizer != null)
            {
                // TODO maybe turn off the hook here, for now
                info.authorizer.free();
                info.authorizer = null;
            }

            if (func != null)
            {
                info.authorizer = new authorizer_hook_info(func, v);
                return SQLite3RuntimeProvider.sqlite3_set_authorizer(db.ToInt64(), Marshal.GetFunctionPointerForDelegate(authorizer_hook_bridge).ToInt64(), info.authorizer.ptr.ToInt64());
            }
            else
            {
                return SQLite3RuntimeProvider.sqlite3_set_authorizer(db.ToInt64(), IntPtr.Zero.ToInt64(), IntPtr.Zero.ToInt64());
            }
        }
コード例 #9
0
 int ISQLite3Provider.sqlite3_set_authorizer(IntPtr db, delegate_authorizer func, object v)
 {
     throw new Exception(GRIPE);
 }
コード例 #10
0
ファイル: raw.cs プロジェクト: softlion/SQLitePCL.raw
 static public int sqlite3_set_authorizer(sqlite3 db, delegate_authorizer authorizer, object user_data)
 {
     return _imp.sqlite3_set_authorizer(db.ptr, authorizer, user_data);
 }