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