Пример #1
0
        internal int lock_vec(uint locker, uint flags, IntPtr[] list, int nlist, DB_LOCKREQ elistp)
        {
            int ret;

            ret = libdb_csharpPINVOKE.DB_ENV_lock_vec(swigCPtr, locker, flags, list, nlist, DB_LOCKREQ.getCPtr(elistp));
            DatabaseException.ThrowException(ret);
            return(ret);
        }
Пример #2
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DB_LOCKREQ obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Пример #3
0
 internal int lock_vec(uint locker, uint flags, IntPtr[] list, int nlist, DB_LOCKREQ elistp)
 {
     int ret;
     ret = libdb_csharpPINVOKE.DB_ENV_lock_vec(swigCPtr, locker, flags, list, nlist, DB_LOCKREQ.getCPtr(elistp));
     DatabaseException.ThrowException(ret);
     return ret;
 }
Пример #4
0
        private void LockMany(
            uint locker, bool wait, LockRequest[] vec, LockRequest failedReq)
        {
            IntPtr[] reqList = new IntPtr[vec.Length];
            DB_LOCKREQ[] lst = new DB_LOCKREQ[vec.Length];

            for (int i = 0; i < vec.Length; i++) {
                reqList[i] = DB_LOCKREQ.getCPtr(
                    LockRequest.get_DB_LOCKREQ(vec[i])).Handle;
                lst[i] = LockRequest.get_DB_LOCKREQ(vec[i]);
            }

            dbenv.lock_vec(locker, wait ? 0 : DbConstants.DB_TXN_NOWAIT,
                reqList, vec.Length, LockRequest.get_DB_LOCKREQ(failedReq));
        }
Пример #5
0
 internal static HandleRef getCPtr(DB_LOCKREQ obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Пример #6
0
 internal LockRequest()
 {
     lockreq = new DB_LOCKREQ();
 }
Пример #7
0
 internal static HandleRef getCPtr(DB_LOCKREQ obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }