private static LogicalCallContext GetLogicalCallContext()
 {
     lock (syncObject)
     {
         if (singletonCallContext == null)
         {
             CallContextProxy proxy = new CallContextProxy(typeof(IDisposable));
             ((IDisposable)proxy.GetTransparentProxy()).Dispose();
             singletonCallContext = proxy.CallContext;
         }
         return(singletonCallContext.Clone() as LogicalCallContext);
     }
 }
示例#2
0
 static LogicalCallContext GetLogicalCallContext()
 {
     lock (syncObject)
     {
         if (singletonCallContext == null)
         {
             CallContextProxy contextProxy = new CallContextProxy(typeof(IDisposable));
             IDisposable      disposable   = (IDisposable)contextProxy.GetTransparentProxy();
             disposable.Dispose();
             singletonCallContext = contextProxy.CallContext;
         }
         return(singletonCallContext.Clone() as LogicalCallContext);
     }
 }
 static LogicalCallContext GetLogicalCallContext()
 {
     lock (syncObject)
     {
         if (singletonCallContext == null)
         {
             CallContextProxy contextProxy = new CallContextProxy(typeof(IDisposable));
             IDisposable disposable = (IDisposable)contextProxy.GetTransparentProxy();
             disposable.Dispose();
             singletonCallContext = contextProxy.CallContext;
         }
         return singletonCallContext.Clone() as LogicalCallContext;
     }
 }
 private static LogicalCallContext GetLogicalCallContext()
 {
     lock (syncObject)
     {
         if (singletonCallContext == null)
         {
             CallContextProxy proxy = new CallContextProxy(typeof(IDisposable));
             ((IDisposable) proxy.GetTransparentProxy()).Dispose();
             singletonCallContext = proxy.CallContext;
         }
         return (singletonCallContext.Clone() as LogicalCallContext);
     }
 }