Пример #1
0
        /// <summary>
        /// Validates the specified REST service response.
        /// </summary>
        /// <param name="faultInfo">The REST service response to be validated.</param>
        /// <returns>An instance of the <see cref="CommunicationException"/> class representing
        /// REST service failure or null reference if there were no errors.</returns>
        private CommunicationException _ValidateResponse(IFaultInfo faultInfo)
        {
            if (faultInfo == null || !faultInfo.IsFault)
            {
                return(null);
            }

            var error = RestHelper.CreateRestException(faultInfo);

            Logger.Warning(error);

            return(new CommunicationException(
                       error.Message,
                       _serviceTitle,
                       CommunicationError.Unknown,
                       error));
        }