public static AvailabilityZoneUnmarshaller GetInstance() { if (instance == null) { instance = new AvailabilityZoneUnmarshaller(); } return(instance); }
public OrderableClusterOption Unmarshall(XmlUnmarshallerContext context) { OrderableClusterOption orderableClusterOption = new OrderableClusterOption(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ClusterVersion", targetDepth)) { orderableClusterOption.ClusterVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterType", targetDepth)) { orderableClusterOption.ClusterType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NodeType", targetDepth)) { orderableClusterOption.NodeType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZones/AvailabilityZone", targetDepth)) { orderableClusterOption.AvailabilityZones.Add(AvailabilityZoneUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(orderableClusterOption); } } return(orderableClusterOption); }
public Subnet Unmarshall(XmlUnmarshallerContext context) { Subnet subnet = new Subnet(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("SubnetIdentifier", targetDepth)) { subnet.SubnetIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SubnetAvailabilityZone", targetDepth)) { subnet.SubnetAvailabilityZone = AvailabilityZoneUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SubnetStatus", targetDepth)) { subnet.SubnetStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(subnet); } } return(subnet); }