internal static ActivityContextState DeserializeFrom(OperationContext wcfOperationContext) { string text = null; if (wcfOperationContext != null && wcfOperationContext.IncomingMessageHeaders != null) { int num = wcfOperationContext.IncomingMessageHeaders.FindHeader("X-MSExchangeActivityCtx", string.Empty); if (num >= 0) { text = wcfOperationContext.IncomingMessageHeaders.GetHeader <string>(num); } ExTraceGlobals.ActivityContextTracer.TraceDebug <string, string>(0L, "ActivityContext.DeserializeFromMessage - in the wcfOperationContext header, Serialized ActivityScope ({0}) was {1}", "X-MSExchangeActivityCtx", text); } return(ActivityContextState.DeserializeFromString(text, null, null)); }
internal static ActivityContextState DeserializeFrom(HttpRequestMessageProperty wcfMessage) { string text = null; string text2 = null; string text3 = null; if (wcfMessage != null && wcfMessage.Headers != null && wcfMessage.Headers.Keys != null) { text = wcfMessage.Headers["X-MSExchangeActivityCtx"]; text2 = wcfMessage.Headers["client-request-id"]; text3 = wcfMessage.Headers["return-client-request-id"]; ExTraceGlobals.ActivityContextTracer.TraceDebug(0L, "ActivityContext.DeserializeFromMessage - in the wcfMessage header, Serialized ActivityScope ({0}) was {1}, {2} was {3}, {4} was {5} ", new object[] { "X-MSExchangeActivityCtx", text, "client-request-id", text2, "return-client-request-id", text3 }); } return(ActivityContextState.DeserializeFromString(text, text2, text3)); }