Exemplo n.º 1
0
        internal static ActivityScope DeserializeFrom(HttpRequest httpRequest, object userState = null)
        {
            ActivityContextState activityContextState = ActivityContextState.DeserializeFrom(httpRequest);

            return(ActivityContext.AddActivityScope(activityContextState, userState, (activityContextState != null) ? activityContextState.ActivityType : ActivityType.Request, ActivityContext.OnStartEventArgs, DiagnosticsResources.ExceptionScopeAlreadyExists(DebugContext.GetDebugInfo())));
        }
Exemplo n.º 2
0
 public static ActivityScope Resume(ActivityContextState activityContextState, object userState = null)
 {
     if (activityContextState == null)
     {
         try
         {
             throw new ArgumentNullException("activityContextState was null");
         }
         catch (ArgumentException)
         {
         }
     }
     return(ActivityContext.AddActivityScope(activityContextState, userState, (activityContextState != null) ? activityContextState.ActivityType : ActivityType.Request, ActivityContext.OnResumeEventArgs, DiagnosticsResources.ExceptionScopeAlreadyExists(DebugContext.GetDebugInfo())));
 }