/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { AdvertiseByoipCidrResponse response = new AdvertiseByoipCidrResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth = 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("byoipCidr", targetDepth)) { var unmarshaller = ByoipCidrUnmarshaller.Instance; response.ByoipCidr = unmarshaller.Unmarshall(context); continue; } } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AdvertiseByoipCidrResponse response = new AdvertiseByoipCidrResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ByoipCidr", targetDepth)) { var unmarshaller = ByoipCidrUnmarshaller.Instance; response.ByoipCidr = unmarshaller.Unmarshall(context); continue; } } return(response); }