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()))); }
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()))); }