public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeSpotPriceHistoryResponse response = new DescribeSpotPriceHistoryResponse(); 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("nextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("spotPriceHistorySet/item", targetDepth)) { var unmarshaller = SpotPriceUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.SpotPriceHistory.Add(item); continue; } } } return response; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeSpotPriceHistoryResponse response = new DescribeSpotPriceHistoryResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("spotPriceHistorySet/item", targetDepth)) { response.SpotPriceHistory.Add(SpotPriceUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("nextToken", targetDepth)) { response.NextToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } } return response; }