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

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

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

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



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

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

                        continue;
                    }
                    if (context.TestExpression("ReservedDBInstances/ReservedDBInstance", targetDepth))
                    {
                        describeReservedDBInstancesResult.ReservedDBInstances.Add(ReservedDBInstanceUnmarshaller.GetInstance().Unmarshall(context));

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



            return(describeReservedDBInstancesResult);
        }