Esempio n. 1
0
        public static EndpointUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new EndpointUnmarshaller();
            }

            return(instance);
        }
        public NodeGroupMember Unmarshall(XmlUnmarshallerContext context)
        {
            NodeGroupMember nodeGroupMember = new NodeGroupMember();
            int             originalDepth   = context.CurrentDepth;
            int             targetDepth     = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("CacheClusterId", targetDepth))
                    {
                        nodeGroupMember.CacheClusterId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheNodeId", targetDepth))
                    {
                        nodeGroupMember.CacheNodeId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ReadEndpoint", targetDepth))
                    {
                        nodeGroupMember.ReadEndpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PreferredAvailabilityZone", targetDepth))
                    {
                        nodeGroupMember.PreferredAvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CurrentRole", targetDepth))
                    {
                        nodeGroupMember.CurrentRole = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(nodeGroupMember);
                }
            }



            return(nodeGroupMember);
        }
        public CacheNode Unmarshall(XmlUnmarshallerContext context)
        {
            CacheNode cacheNode     = new CacheNode();
            int       originalDepth = context.CurrentDepth;
            int       targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("CacheNodeId", targetDepth))
                    {
                        cacheNode.CacheNodeId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheNodeStatus", targetDepth))
                    {
                        cacheNode.CacheNodeStatus = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheNodeCreateTime", targetDepth))
                    {
                        cacheNode.CacheNodeCreateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Endpoint", targetDepth))
                    {
                        cacheNode.Endpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ParameterGroupStatus", targetDepth))
                    {
                        cacheNode.ParameterGroupStatus = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(cacheNode);
                }
            }



            return(cacheNode);
        }
Esempio n. 4
0
        public NodeGroup Unmarshall(XmlUnmarshallerContext context)
        {
            NodeGroup nodeGroup     = new NodeGroup();
            int       originalDepth = context.CurrentDepth;
            int       targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("NodeGroupId", targetDepth))
                    {
                        nodeGroup.NodeGroupId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Status", targetDepth))
                    {
                        nodeGroup.Status = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PrimaryEndpoint", targetDepth))
                    {
                        nodeGroup.PrimaryEndpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("NodeGroupMembers/NodeGroupMember", targetDepth))
                    {
                        nodeGroup.NodeGroupMembers.Add(NodeGroupMemberUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(nodeGroup);
                }
            }



            return(nodeGroup);
        }
        public CacheCluster Unmarshall(XmlUnmarshallerContext context)
        {
            CacheCluster cacheCluster  = new CacheCluster();
            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("CacheClusterId", targetDepth))
                    {
                        cacheCluster.CacheClusterId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ConfigurationEndpoint", targetDepth))
                    {
                        cacheCluster.ConfigurationEndpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ClientDownloadLandingPage", targetDepth))
                    {
                        cacheCluster.ClientDownloadLandingPage = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheNodeType", targetDepth))
                    {
                        cacheCluster.CacheNodeType = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Engine", targetDepth))
                    {
                        cacheCluster.Engine = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("EngineVersion", targetDepth))
                    {
                        cacheCluster.EngineVersion = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheClusterStatus", targetDepth))
                    {
                        cacheCluster.CacheClusterStatus = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("NumCacheNodes", targetDepth))
                    {
                        cacheCluster.NumCacheNodes = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PreferredAvailabilityZone", targetDepth))
                    {
                        cacheCluster.PreferredAvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheClusterCreateTime", targetDepth))
                    {
                        cacheCluster.CacheClusterCreateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PreferredMaintenanceWindow", targetDepth))
                    {
                        cacheCluster.PreferredMaintenanceWindow = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("PendingModifiedValues", targetDepth))
                    {
                        cacheCluster.PendingModifiedValues = PendingModifiedValuesUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("NotificationConfiguration", targetDepth))
                    {
                        cacheCluster.NotificationConfiguration = NotificationConfigurationUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheSecurityGroups/CacheSecurityGroup", targetDepth))
                    {
                        cacheCluster.CacheSecurityGroups.Add(CacheSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("CacheParameterGroup", targetDepth))
                    {
                        cacheCluster.CacheParameterGroup = CacheParameterGroupStatusUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheSubnetGroupName", targetDepth))
                    {
                        cacheCluster.CacheSubnetGroupName = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheNodes/CacheNode", targetDepth))
                    {
                        cacheCluster.CacheNodes.Add(CacheNodeUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("AutoMinorVersionUpgrade", targetDepth))
                    {
                        cacheCluster.AutoMinorVersionUpgrade = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("SecurityGroups/member", targetDepth))
                    {
                        cacheCluster.SecurityGroups.Add(SecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(cacheCluster);
                }
            }



            return(cacheCluster);
        }