public RevokeDBSecurityGroupIngressResult Unmarshall(UnmarshallerContext context)
        {
            RevokeDBSecurityGroupIngressResult result = new RevokeDBSecurityGroupIngressResult();

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

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

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


            return(result);
        }
Exemplo n.º 2
0
        public static DBSecurityGroupUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new DBSecurityGroupUnmarshaller();
            }

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

                        continue;
                    }
                    if (context.TestExpression("DBSecurityGroups/DBSecurityGroup", targetDepth))
                    {
                        describeDBSecurityGroupsResult.DBSecurityGroups.Add(DBSecurityGroupUnmarshaller.GetInstance().Unmarshall(context));

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

            return(describeDBSecurityGroupsResult);
        }