Tiraggo.Interfaces.tgTransactionScope.GetCurrentTx C# (CSharp) Метод

GetCurrentTx() приватный статический Метод

Internal method.
private static GetCurrentTx ( ) : tgTransactionScope
Результат tgTransactionScope
        private static tgTransactionScope GetCurrentTx()
        {
            tgTransactionScope tx = null;

            object o = Thread.GetData(txSlot);
            if(o != null)
            {
                Stack<tgTransactionScope> stack = o as Stack<tgTransactionScope>;
                if (stack.Count > 0)
                {
                    tx = stack.Peek();
                }
            }

            return tx;
        }