GetCount() private méthode

private GetCount ( IntPtr handle, IntPtr txnhandle, int flags, System.Int64 &count ) : int
handle System.IntPtr
txnhandle System.IntPtr
flags int
count System.Int64
Résultat int
Exemple #1
0
        /// <summary>
        /// Returns the number of keys in this Database
        /// </summary>
        /// <remarks>
        /// This method wraps the native ups_db_count function.
        /// <br />
        /// You can specify UPS_SKIP_DUPLICATES if you do now want
        /// to include any duplicates in the count.
        /// </remarks>
        public Int64 GetCount(Transaction txn, int flags)
        {
            int   st;
            Int64 count = 0;

            lock (this) {
                st = NativeMethods.GetCount(handle,
                                            txn != null ? txn.Handle : IntPtr.Zero,
                                            flags, out count);
            }
            if (st != 0)
            {
                throw new DatabaseException(st);
            }
            return(count);
        }