private static void UnmarshallResult(XmlUnmarshallerContext context, PurchaseReservedCacheNodesOfferingResponse 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("ReservedCacheNode", targetDepth)) { response.ReservedCacheNode = ReservedCacheNodeUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } }
public PurchaseReservedCacheNodesOfferingResult Unmarshall(XmlUnmarshallerContext context) { PurchaseReservedCacheNodesOfferingResult result = new PurchaseReservedCacheNodesOfferingResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ReservedCacheNode", targetDepth)) { result.ReservedCacheNode = ReservedCacheNodeUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(result); } } return(result); }
public static ReservedCacheNodeUnmarshaller GetInstance() { if (instance == null) { instance = new ReservedCacheNodeUnmarshaller(); } return(instance); }
public DescribeReservedCacheNodesResult Unmarshall(XmlUnmarshallerContext context) { DescribeReservedCacheNodesResult describeReservedCacheNodesResult = new DescribeReservedCacheNodesResult(); 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)) { describeReservedCacheNodesResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReservedCacheNodes/ReservedCacheNode", targetDepth)) { describeReservedCacheNodesResult.ReservedCacheNodes.Add(ReservedCacheNodeUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(describeReservedCacheNodesResult); } } return(describeReservedCacheNodesResult); }