Exemplo n.º 1
0
        public RebootDBInstanceResult Unmarshall(UnmarshallerContext context)
        {
            RebootDBInstanceResult result = new RebootDBInstanceResult();

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

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

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


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

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

                        continue;
                    }
                    if (context.TestExpression("DBInstances/DBInstance", targetDepth))
                    {
                        describeDBInstancesResult.DBInstances.Add(DBInstanceUnmarshaller.GetInstance().Unmarshall(context));

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

            return(describeDBInstancesResult);
        }