Пример #1
0
        internal static TrackingContext GetInstance(IDictionary <string, object> messageProperties, IDictionary <string, string> messageHeaders)
        {
            string trackingId = TrackingContext.GetTrackingId(messageProperties, messageHeaders);

            return(new TrackingContext(trackingId, TrackingContext.GetSystemTracker(messageProperties, messageHeaders)));
        }
Пример #2
0
        internal static TrackingContext GetInstance(Message message, string overrideSystemTracker, bool embedRoleInformation, WebOperationContext webOperationContext = null)
        {
            string            str;
            MessageProperties properties = message.Properties;
            MessageHeaders    headers    = message.Headers;
            string            trackingId = TrackingContext.GetTrackingId(properties, headers, webOperationContext);

            str = (!string.IsNullOrEmpty(overrideSystemTracker) ? overrideSystemTracker : TrackingContext.GetSystemTracker(properties, headers));
            string trackingId1 = trackingId;

            if (embedRoleInformation)
            {
                trackingId1 = TrackingContext.AppendRoleInstanceInformationToTrackingId(trackingId);
            }
            return(new TrackingContext(trackingId1, str));
        }