public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CancelReservedInstancesListingResponse response = new CancelReservedInstancesListingResponse(); 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("reservedInstancesListingsSet/item", targetDepth)) { var unmarshaller = ReservedInstancesListingUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.ReservedInstancesListings.Add(item); continue; } } } return response; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CancelReservedInstancesListingResponse response = new CancelReservedInstancesListingResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("reservedInstancesListingsSet/item", targetDepth)) { response.ReservedInstancesListings.Add(ReservedInstancesListingUnmarshaller.GetInstance().Unmarshall(context)); continue; } } } return response; }