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;
}