public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeInstancesResponse response = new DescribeInstancesResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("reservationSet/item", targetDepth)) { response.Reservations.Add(ReservationUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("nextToken", targetDepth)) { response.NextToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } } return(response); }
public static ReservationUnmarshaller GetInstance() { if (instance == null) { instance = new ReservationUnmarshaller(); } return(instance); }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { RunInstancesResponse response = new RunInstancesResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression(".", targetDepth)) { response.Reservation = ReservationUnmarshaller.GetInstance().Unmarshall(context); continue; } } } return(response); }