コード例 #1
0
 private static void AbortAll(TransactionManager manager)
 {
     foreach (var p in manager._transactions.ToList())
     {
         AbortAll(p.Key.SubTransactionsManager);
         p.Key.Abort();
     }
 }
コード例 #2
0
        /// <summary>
        /// Created new instance of LightningTransaction
        /// </summary>
        /// <param name="environment">Environment.</param>
        /// <param name="parent">Parent transaction or null.</param>
        /// <param name="flags">Transaction open options.</param>
        internal LightningTransaction(LightningEnvironment environment, IntPtr handle, LightningTransaction parent, TransactionBeginFlags flags)
        {
            if (environment == null)
                throw new ArgumentNullException("environment");

            this.Environment = environment;
            this.ParentTransaction = parent;
            this.IsReadOnly = flags == TransactionBeginFlags.ReadOnly;
            this.State = LightningTransactionState.Active;

            _handle = handle;
            _subTransactionsManager = new TransactionManager(environment, this);
            _cursorManager = new CursorManager(this);
        }