public static SubnetUnmarshaller GetInstance() { if (instance == null) { instance = new SubnetUnmarshaller(); } return(instance); }
public ClusterSubnetGroup Unmarshall(XmlUnmarshallerContext context) { ClusterSubnetGroup clusterSubnetGroup = new ClusterSubnetGroup(); 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("ClusterSubnetGroupName", targetDepth)) { clusterSubnetGroup.ClusterSubnetGroupName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { clusterSubnetGroup.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { clusterSubnetGroup.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SubnetGroupStatus", targetDepth)) { clusterSubnetGroup.SubnetGroupStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Subnets/Subnet", targetDepth)) { clusterSubnetGroup.Subnets.Add(SubnetUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(clusterSubnetGroup); } } return(clusterSubnetGroup); }