Amazon.ElasticMapReduce.Model.Internal.MarshallTransformations.ListInstanceGroupsResponseUnmarshaller.UnmarshallResult C# (CSharp) Метод

UnmarshallResult() приватный статический Метод

private static UnmarshallResult ( JsonUnmarshallerContext context, ListInstanceGroupsResponse response ) : void
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
response Amazon.ElasticMapReduce.Model.ListInstanceGroupsResponse
Результат void
        private static void UnmarshallResult(JsonUnmarshallerContext context,ListInstanceGroupsResponse response)
        {
          
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            while (context.Read())
            {
              
              if (context.TestExpression("InstanceGroups", targetDepth))
              {
                context.Read();
                
                if (context.CurrentTokenType == JsonToken.Null)
                {
                    response.InstanceGroups = null;
                    continue;
                }
                  response.InstanceGroups = new List<InstanceGroup>();
                  InstanceGroupUnmarshaller unmarshaller = InstanceGroupUnmarshaller.GetInstance();
                while (context.Read())
                {
                  JsonToken token = context.CurrentTokenType;                
                  if (token == JsonToken.ArrayStart)
                  {
                    continue;
                  }
                  if (token == JsonToken.ArrayEnd)
                  {
                    break;
                  }
                   response.InstanceGroups.Add(unmarshaller.Unmarshall(context));
                }
                continue;
              }
  
              if (context.TestExpression("Marker", targetDepth))
              {
                context.Read();
                response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
                if (context.CurrentDepth <= originalDepth)
                {                   
                    return;
                }
            }
                        
            return;
        }