Exemplo n.º 1
0
 public static StepUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new StepUnmarshaller();
     }
     return(instance);
 }
       public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
       {
           DescribeStepResponse response = new DescribeStepResponse();       
         
           context.Read();
           int targetDepth = context.CurrentDepth;
           while (context.ReadAtDepth(targetDepth))
           {
             
             if (context.TestExpression("Step", targetDepth))
             {
               response.Step = StepUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
           }
                       
           return response;
       }                        
Exemplo n.º 3
0
        private static void UnmarshallResult(JsonUnmarshallerContext context, DescribeStepResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

            return;
        }