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

            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
        private static void UnmarshallResult(XmlUnmarshallerContext context, ModifyDBInstanceResponse 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("DBInstance", targetDepth))
                    {
                        response.DBInstance = DBInstanceUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }
        }
        public static DBInstanceUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new DBInstanceUnmarshaller();
            }

            return(instance);
        }
        public DescribeDBInstancesResult Unmarshall(XmlUnmarshallerContext 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);
        }