Type.GetType重置Call​​Context中的逻辑数据

时间:2016-09-14 07:43:02

标签: c# multithreading log4net system.reflection control-flow

int c2 = log4net.LogicalThreadContext.Stacks["LDC"].Count;
Type t = Type.GetType(@namespace + entity) ?? Type.GetType(@namespace + entity + postfix);
int c3 = log4net.LogicalThreadContext.Stacks["LDC"].Count;
if (c2 != 0 && c3 == 0) // true
{
    // bp
}

LogicalThreadContext指向CallContext.LogicalSetData

为什么会这样?

0 个答案:

没有答案