public static SystemTrackerHeader Read(MessageHeaders messageHeaders)
        {
            SystemTrackerHeader systemTrackerHeader;

            if (!SystemTrackerHeader.TryRead(messageHeaders, out systemTrackerHeader))
            {
                throw new ArgumentException(SRClient.SystemTrackerHeaderMissing, "messageHeaders");
            }
            return(systemTrackerHeader);
        }
Beispiel #2
0
        private static string GetSystemTracker(MessageProperties messageProperties, MessageHeaders messageHeaders)
        {
            string tracker;
            SystemTrackerMessageProperty systemTrackerMessageProperty;
            SystemTrackerHeader          systemTrackerHeader;

            if (!SystemTrackerMessageProperty.TryGet <SystemTrackerMessageProperty>(messageProperties, out systemTrackerMessageProperty))
            {
                tracker = (!SystemTrackerHeader.TryRead(messageHeaders, out systemTrackerHeader) ? string.Empty : systemTrackerHeader.Tracker);
            }
            else
            {
                tracker = systemTrackerMessageProperty.Tracker;
            }
            return(tracker);
        }