public static DBEngineVersionUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new DBEngineVersionUnmarshaller();
            }

            return(instance);
        }
Example #2
0
        public DescribeDBEngineVersionsResult Unmarshall(UnmarshallerContext context)
        {
            DescribeDBEngineVersionsResult describeDBEngineVersionsResult = new DescribeDBEngineVersionsResult();
            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))
                    {
                        describeDBEngineVersionsResult.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("DBEngineVersions/DBEngineVersion", targetDepth))
                    {
                        describeDBEngineVersionsResult.DBEngineVersions.Add(DBEngineVersionUnmarshaller.GetInstance().Unmarshall(context));

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

            return(describeDBEngineVersionsResult);
        }