public DescribeTableResult Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeTableResult describeTableResult = new DescribeTableResult();

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

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("Table", targetDepth))
                    {
                        describeTableResult.Table = TableDescriptionUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(describeTableResult);
                }
            }


            return(describeTableResult);
        }
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            DescribeTableResponse response = new DescribeTableResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Table", targetDepth))
                {
                    response.Table = TableDescriptionUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Exemplo n.º 3
0
        private static void UnmarshallResult(JsonUnmarshallerContext context, DeleteTableResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.TestExpression("TableDescription", targetDepth))
                {
                    context.Read();
                    response.TableDescription = TableDescriptionUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.CurrentDepth <= originalDepth)
                {
                    return;
                }
            }

            return;
        }