Ejemplo n.º 1
0
        public static Address GetAddressOfFaultingEndpoint(TransportMessage message)
        {
            var failedQ = GetHeader(message, FaultsHeaderKeys.FailedQ);

            if (string.IsNullOrEmpty(failedQ))
            {
                failedQ = MessageHelpers.GetFailedQueueFromLabel(MsmqUtilities.Convert(message));
            }

            if (string.IsNullOrEmpty(failedQ))
            {
                throw new Exception("Could not find address");
            }

            return(Address.Parse(failedQ));
        }