public static NodeGroupUnmarshaller GetInstance() { if (instance == null) { instance = new NodeGroupUnmarshaller(); } return(instance); }
public ReplicationGroup Unmarshall(XmlUnmarshallerContext context) { ReplicationGroup replicationGroup = new ReplicationGroup(); 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("ReplicationGroupId", targetDepth)) { replicationGroup.ReplicationGroupId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { replicationGroup.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { replicationGroup.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PendingModifiedValues", targetDepth)) { replicationGroup.PendingModifiedValues = ReplicationGroupPendingModifiedValuesUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MemberClusters/ClusterId", targetDepth)) { replicationGroup.MemberClusters.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("NodeGroups/NodeGroup", targetDepth)) { replicationGroup.NodeGroups.Add(NodeGroupUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("SnapshottingClusterId", targetDepth)) { replicationGroup.SnapshottingClusterId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(replicationGroup); } } return(replicationGroup); }