Tiraggo.Interfaces.tgTransactionScope.IDisposable C# (CSharp) Method

IDisposable() private method

Internal. Called when the "using" statement is exited.
private IDisposable ( ) : void
return void
        void IDisposable.Dispose()
        {
            try
            {
                if (this.root == this && this.count > 0)
                {
                    // Somebody didn't call Complete, we must roll back ...
                    if (this.root.transactions.Count > 0)
                    {
                        Rollback();
                        return;
                    }
                }
            }
            finally
            {
                if (this.commitList != null)
                {
                    commitList.Clear();
                    this.commitList = null;
                }

                Stack<tgTransactionScope> stack = (Stack<tgTransactionScope>)Thread.GetData(txSlot);
                stack.Pop();
            }
        }