示例#1
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, CreateClusterParameterGroupResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("ClusterParameterGroup", targetDepth))
                    {
                        response.ClusterParameterGroup = ClusterParameterGroupUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }
        }
        public CreateClusterParameterGroupResult Unmarshall(XmlUnmarshallerContext context)
        {
            CreateClusterParameterGroupResult result = new CreateClusterParameterGroupResult();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("ClusterParameterGroup", targetDepth))
                    {
                        result.ClusterParameterGroup = ClusterParameterGroupUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(result);
                }
            }



            return(result);
        }
示例#3
0
        public static ClusterParameterGroupUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new ClusterParameterGroupUnmarshaller();
            }

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

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

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

                        continue;
                    }
                    if (context.TestExpression("ParameterGroups/ClusterParameterGroup", targetDepth))
                    {
                        describeClusterParameterGroupsResult.ParameterGroups.Add(ClusterParameterGroupUnmarshaller.GetInstance().Unmarshall(context));

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



            return(describeClusterParameterGroupsResult);
        }