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); }
public OrderableDBInstanceOption Unmarshall(XmlUnmarshallerContext context) { OrderableDBInstanceOption orderableDBInstanceOption = new OrderableDBInstanceOption(); 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("Engine", targetDepth)) { orderableDBInstanceOption.Engine = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EngineVersion", targetDepth)) { orderableDBInstanceOption.EngineVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBInstanceClass", targetDepth)) { orderableDBInstanceOption.DBInstanceClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LicenseModel", targetDepth)) { orderableDBInstanceOption.LicenseModel = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZones/AvailabilityZone", targetDepth)) { orderableDBInstanceOption.AvailabilityZones.Add(AvailabilityZoneUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("MultiAZCapable", targetDepth)) { orderableDBInstanceOption.MultiAZCapable = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReadReplicaCapable", targetDepth)) { orderableDBInstanceOption.ReadReplicaCapable = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Vpc", targetDepth)) { orderableDBInstanceOption.Vpc = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(orderableDBInstanceOption); } } return(orderableDBInstanceOption); }