Esempio n. 1
0
        public static CommunicationException ConvertToCommunicationException(MessagingException exception, out bool shouldFault)
        {
            shouldFault = false;
            if (exception is MessagingEntityNotFoundException)
            {
                shouldFault = true;
                return(new EndpointNotFoundException(exception.Message, exception));
            }
            if (exception is MessagingCommunicationException)
            {
                EndpointNotFoundException innerException = exception.InnerException as EndpointNotFoundException;
                if (innerException != null)
                {
                    shouldFault = true;
                    return(innerException);
                }
            }
            CommunicationException communicationException = exception.InnerException as CommunicationException ?? new CommunicationException(exception.Message, exception);

            return(communicationException);
        }
Esempio n. 2
0
        public static CommunicationException ConvertToCommunicationException(MessagingException exception)
        {
            bool flag;

            return(MessagingExceptionHelper.ConvertToCommunicationException(exception, out flag));
        }