/// <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;
        }
 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;
 }
 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;
 }
 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;
            }
        }
        /// <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;
        }
        /// <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;
            }
        }
        /// <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;
            }
        }
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     _isActive = false;
 }
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     return;
 }
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     return;
 }
Пример #14
0
 public void Rollback(IProviderUnit work)
 {
     WasRolledBack = true;
     _isActive     = false;
 }