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