private static void UnmarshallResult(XmlUnmarshallerContext context, PurchaseReservedNodeOfferingResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ReservedNode", targetDepth)) { response.ReservedNode = ReservedNodeUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } }
public PurchaseReservedNodeOfferingResult Unmarshall(XmlUnmarshallerContext context) { PurchaseReservedNodeOfferingResult result = new PurchaseReservedNodeOfferingResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ReservedNode", targetDepth)) { result.ReservedNode = ReservedNodeUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(result); } } return(result); }
public DescribeReservedNodesResult Unmarshall(XmlUnmarshallerContext context) { DescribeReservedNodesResult describeReservedNodesResult = new DescribeReservedNodesResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Marker", targetDepth)) { describeReservedNodesResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReservedNodes/ReservedNode", targetDepth)) { describeReservedNodesResult.ReservedNodes.Add(ReservedNodeUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(describeReservedNodesResult); } } return(describeReservedNodesResult); }