Amazon.WAFRegional.Model.Internal.MarshallTransformations.UpdateSqlInjectionMatchSetResponseUnmarshaller.UnmarshallException C# (CSharp) Метод

UnmarshallException() публичный Метод

Unmarshaller error response to exception.
public UnmarshallException ( JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode ) : AmazonServiceException
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
innerException System.Exception
statusCode HttpStatusCode
Результат Amazon.Runtime.AmazonServiceException
        public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
        {
            ErrorResponse errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFInternalErrorException"))
            {
                return new WAFInternalErrorException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFInvalidAccountException"))
            {
                return new WAFInvalidAccountException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFInvalidOperationException"))
            {
                return new WAFInvalidOperationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFInvalidParameterException"))
            {
                return new WAFInvalidParameterException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFLimitsExceededException"))
            {
                return new WAFLimitsExceededException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFNonexistentContainerException"))
            {
                return new WAFNonexistentContainerException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFNonexistentItemException"))
            {
                return new WAFNonexistentItemException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            if (errorResponse.Code != null && errorResponse.Code.Equals("WAFStaleDataException"))
            {
                return new WAFStaleDataException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
            }
            return new AmazonWAFRegionalException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
        }
UpdateSqlInjectionMatchSetResponseUnmarshaller