private static void UnmarshallResult(XmlUnmarshallerContext context, CreateCacheSubnetGroupResponse 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("CacheSubnetGroup", targetDepth))
                    {
                        response.CacheSubnetGroup = CacheSubnetGroupUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }
        }
コード例 #2
0
        public CreateCacheSubnetGroupResult Unmarshall(XmlUnmarshallerContext context)
        {
            CreateCacheSubnetGroupResult result = new CreateCacheSubnetGroupResult();

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

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

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



            return(result);
        }
コード例 #3
0
        public static CacheSubnetGroupUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new CacheSubnetGroupUnmarshaller();
            }

            return(instance);
        }
        public DescribeCacheSubnetGroupsResult Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeCacheSubnetGroupsResult describeCacheSubnetGroupsResult = new DescribeCacheSubnetGroupsResult();
            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))
                    {
                        describeCacheSubnetGroupsResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CacheSubnetGroups/CacheSubnetGroup", targetDepth))
                    {
                        describeCacheSubnetGroupsResult.CacheSubnetGroups.Add(CacheSubnetGroupUnmarshaller.GetInstance().Unmarshall(context));

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



            return(describeCacheSubnetGroupsResult);
        }