/// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public virtual void Dispose()
        {
            if (!IsDisposed)
            {
                IsDisposed = true;

                // First remove ourselves from the stack
                if (Current == this)
                {
                    LogicalTransactionScope <T> .Pop();
                }
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="LogicalDisposeScope"/> class.
 /// </summary>
 /// <param name="combinationLogic">The combination logic.</param>
 public LogicalDisposeScope(TransactionCombinationLogic combinationLogic)
 {
     LogicalTransactionScope <LogicalDisposeScope> .Push(this, combinationLogic);
 }