Example #1
0
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         // Dispose of the handle
         if (!m_handle.IsClosed)
         {
             m_handle.Dispose();
         }
     }
 }
        public IFdbTransactionHandler CreateTransaction(FdbOperationContext context)
        {
            TransactionHandle?handle = null;

            try
            {
                var err = FdbNative.DatabaseCreateTransaction(m_handle, out handle);
                if (Fdb.Failed(err))
                {
                    throw Fdb.MapToException(err) !;
                }
                return(new FdbNativeTransaction(this, handle));
            }
            catch (Exception)
            {
                handle?.Dispose();
                throw;
            }
        }