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

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

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