Beispiel #1
0
 private static void DoCallback(AsyncCallback callback, IAsyncResult result)
 {
     if (result is TraceAsyncResult)
     {
         TraceAsyncResult result2 = result as TraceAsyncResult;
         if (TraceUtility.MessageFlowTracingOnly)
         {
             Trace.CorrelationManager.ActivityId = result2.CallbackActivity.Id;
             result2.CallbackActivity            = null;
         }
         using (ServiceModelActivity.BoundOperation(result2.CallbackActivity))
         {
             callback(result);
         }
     }
 }
Beispiel #2
0
        private static void DoCallback(AsyncCallback callback, IAsyncResult result)
        {
            if (result is TraceAsyncResult)
            {
                TraceAsyncResult thisPtr = result as TraceAsyncResult;
                Fx.Assert(thisPtr.CallbackActivity != null, "this shouldn't be hooked up if we don't have a CallbackActivity");

                if (TraceUtility.MessageFlowTracingOnly)
                {
                    thisPtr.CallbackActivity = null;
                }

                using (ServiceModelActivity.BoundOperation(thisPtr.CallbackActivity))
                {
                    callback(result);
                }
            }
        }