Exemple #1
0
        private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteDBSnapshotResponse 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("DBSnapshot", targetDepth))
                    {
                        response.DBSnapshot = DBSnapshotUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }
        }
        public CopyDBSnapshotResult Unmarshall(XmlUnmarshallerContext context)
        {
            CopyDBSnapshotResult result = new CopyDBSnapshotResult();

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

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

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



            return(result);
        }
Exemple #3
0
        public DescribeDBSnapshotsResult Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeDBSnapshotsResult describeDBSnapshotsResult = new DescribeDBSnapshotsResult();
            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))
                    {
                        describeDBSnapshotsResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("DBSnapshots/DBSnapshot", targetDepth))
                    {
                        describeDBSnapshotsResult.DBSnapshots.Add(DBSnapshotUnmarshaller.GetInstance().Unmarshall(context));

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



            return(describeDBSnapshotsResult);
        }