コード例 #1
0
        /// <summary>Rolls back this transaction. </summary>
        public void Rollback(IProviderUnit unit)
        {
            if (!IsActive || WasCommitted)
                return;

            this.CheckThrowObjectDisposed(base.IsDisposed, this.GetType().Name + "...Transaction:Rollback");
            WasRolledBack = PerformExplicitRollback();
            if (WasRolledBack)
                IsActive = false;
        }
コード例 #2
0
 public void Commit(IProviderUnit work)
 {
     try
     {
         CacheFlushActions.IfNotNull(x => x.ForEach(y => y.Invoke()));
     }
     catch (Exception ex)
     {
         LogHelper.Error<TransactionMock>("Could not perform an action on completion of a transaction. The transaction will continue.", ex);
     } 
     WasCommitted = true;
     _isActive = false;
 }
コード例 #3
0
 public void Commit(IProviderUnit work)
 {
     try
     {
         PerformPreCommitalActions();
     }
     catch (Exception ex)
     {
         LogHelper.Error <NullProviderTransaction>("Could not perform an action on completion of a transaction. The transaction will continue.", ex);
     }
     WasCommitted = true;
     return;
 }
コード例 #4
0
 public void Commit(IProviderUnit work)
 {
     try
     {
         CacheFlushActions.IfNotNull(x => x.ForEach(y => y.Invoke()));
     }
     catch (Exception ex)
     {
         LogHelper.Error <TransactionMock>("Could not perform an action on completion of a transaction. The transaction will continue.", ex);
     }
     WasCommitted = true;
     _isActive    = false;
 }
コード例 #5
0
 public void Commit(IProviderUnit work)
 {
     try
     {
         PerformPreCommitalActions();
     }
     catch (Exception ex)
     {
         LogHelper.Error<NullProviderTransaction>("Could not perform an action on completion of a transaction. The transaction will continue.", ex);
     } 
     WasCommitted = true;
     return;
 }
コード例 #6
0
        /// <summary>Rolls back this transaction. </summary>
        public void Rollback(IProviderUnit unit)
        {
            if (!IsActive || WasCommitted)
            {
                return;
            }

            this.CheckThrowObjectDisposed(base.IsDisposed, this.GetType().Name + "...Transaction:Rollback");
            WasRolledBack = PerformExplicitRollback();
            if (WasRolledBack)
            {
                IsActive = false;
            }
        }
コード例 #7
0
        /// <summary>Commits this transaction. </summary>
        public void Commit(IProviderUnit unit)
        {
            this.CheckThrowObjectDisposed(base.IsDisposed, this.GetType().Name + "...Transaction:Commit");

            if (!IsActive || WasRolledBack) return;

            try
            {
                PerformPreCommitalActions();
            }
            catch (Exception ex)
            {
                LogHelper.Error<AbstractProviderTransaction>("While completing a transaction, PerformPreCommitalActions threw an error. The transaction will continue.", ex);
            }
            WasCommitted = PerformCommit();
            if (WasCommitted)
                IsActive = false;
        }
コード例 #8
0
        /// <summary>Commits this transaction. </summary>
        public void Commit(IProviderUnit unit)
        {
            this.CheckThrowObjectDisposed(base.IsDisposed, this.GetType().Name + "...Transaction:Commit");

            if (!IsActive || WasRolledBack) return;

            try
            {
                CacheFlushActions.IfNotNull(x => x.ForEach(y => y.Invoke()));
            }
            catch (Exception ex)
            {
                LogHelper.Error<AbstractProviderTransaction>("Could not perform an action on completion of a transaction. The transaction will continue.", ex);
            }
            WasCommitted = PerformCommit();
            if (WasCommitted)
                IsActive = false;
        }
コード例 #9
0
        /// <summary>Commits this transaction. </summary>
        public void Commit(IProviderUnit unit)
        {
            this.CheckThrowObjectDisposed(base.IsDisposed, this.GetType().Name + "...Transaction:Commit");

            if (!IsActive || WasRolledBack)
            {
                return;
            }

            try
            {
                CacheFlushActions.IfNotNull(x => x.ForEach(y => y.Invoke()));
            }
            catch (Exception ex)
            {
                LogHelper.Error <AbstractProviderTransaction>("Could not perform an action on completion of a transaction. The transaction will continue.", ex);
            }
            WasCommitted = PerformCommit();
            if (WasCommitted)
            {
                IsActive = false;
            }
        }
コード例 #10
0
        /// <summary>Commits this transaction. </summary>
        public void Commit(IProviderUnit unit)
        {
            this.CheckThrowObjectDisposed(base.IsDisposed, this.GetType().Name + "...Transaction:Commit");

            if (!IsActive || WasRolledBack)
            {
                return;
            }

            try
            {
                PerformPreCommitalActions();
            }
            catch (Exception ex)
            {
                LogHelper.Error <AbstractProviderTransaction>("While completing a transaction, PerformPreCommitalActions threw an error. The transaction will continue.", ex);
            }
            WasCommitted = PerformCommit();
            if (WasCommitted)
            {
                IsActive = false;
            }
        }
コード例 #11
0
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     _isActive = false;
 }
コード例 #12
0
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     return;
 }
コード例 #13
0
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     return;
 }
コード例 #14
0
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     _isActive     = false;
 }