Exemplo n.º 1
0
 // assumes deadlock information was already loaded into RequestContext from the message
 private static void UpdateDeadlockInfoInRequestContext(RequestInvocationHistory thisInvocation)
 {
     IList prevChain;
     object obj = RequestContext.Get(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER);
     if (obj != null)
     {
         prevChain = ((IList)obj);
     }
     else
     {
         prevChain = new List<RequestInvocationHistory>();
         RequestContext.Set(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER, prevChain);
     }
     // append this call to the end of the call chain. Update in place.
     prevChain.Add(thisInvocation);
 }
Exemplo n.º 2
0
        // assumes deadlock information was already loaded into RequestContext from the message
        private static void UpdateInvocationHistoryInRequestContext(RequestInvocationHistory thisInvocation)
        {
            IList <RequestInvocationHistory> prevChain;

            if (RequestContext.Get(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER) is IList <RequestInvocationHistory> obj)
            {
                prevChain = obj;
            }
            else
            {
                prevChain = new List <RequestInvocationHistory>();
                RequestContext.Set(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER, prevChain);
            }

            // append this call to the end of the call chain. Update in place.
            prevChain.Add(thisInvocation);
        }
Exemplo n.º 3
0
 // assumes deadlock information was already loaded into RequestContext from the message
 private static void UpdateDeadlockInfoInRequestContext(RequestInvocationHistory thisInvocation)
 {
     IList prevChain;
     object obj = RequestContext.Get(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER);
     if (obj != null)
     {
         prevChain = ((IList)obj);
     }
     else
     {
         prevChain = new List<RequestInvocationHistory>();
         RequestContext.Set(RequestContext.CALL_CHAIN_REQUEST_CONTEXT_HEADER, prevChain);
     }
     // append this call to the end of the call chain. Update in place.
     prevChain.Add(thisInvocation);
 }