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

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

private static UnmarshallResult ( JsonUnmarshallerContext context, ValidatePipelineDefinitionResponse response ) : void
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
response Amazon.DataPipeline.Model.ValidatePipelineDefinitionResponse
Результат void
        private static void UnmarshallResult(JsonUnmarshallerContext context,ValidatePipelineDefinitionResponse response)
        {
          
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            while (context.Read())
            {
              
              if (context.TestExpression("validationErrors", targetDepth))
              {
                context.Read();
                response.ValidationErrors = new List<ValidationError>();
                        ValidationErrorUnmarshaller unmarshaller = ValidationErrorUnmarshaller.GetInstance();
                while (context.Read())
                {
                  JsonToken token = context.CurrentTokenType;                
                  if (token == JsonToken.ArrayStart)
                  {
                    continue;
                  }
                  if (token == JsonToken.ArrayEnd)
                  {
                    break;
                  }
                   response.ValidationErrors.Add(unmarshaller.Unmarshall(context));
                }
                continue;
              }
  
              if (context.TestExpression("validationWarnings", targetDepth))
              {
                context.Read();
                response.ValidationWarnings = new List<ValidationWarning>();
                        ValidationWarningUnmarshaller unmarshaller = ValidationWarningUnmarshaller.GetInstance();
                while (context.Read())
                {
                  JsonToken token = context.CurrentTokenType;                
                  if (token == JsonToken.ArrayStart)
                  {
                    continue;
                  }
                  if (token == JsonToken.ArrayEnd)
                  {
                    break;
                  }
                   response.ValidationWarnings.Add(unmarshaller.Unmarshall(context));
                }
                continue;
              }
  
              if (context.TestExpression("errored", targetDepth))
              {
                context.Read();
                response.Errored = BoolUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
                if (context.CurrentDepth <= originalDepth)
                {                   
                    return;
                }
            }
                        
            return;
        }                        
        
ValidatePipelineDefinitionResponseUnmarshaller