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

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

private static UnmarshallResult ( JsonUnmarshallerContext context, GetItemResponse response ) : void
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
response Amazon.DynamoDBv2.Model.GetItemResponse
Результат void
        private static void UnmarshallResult(JsonUnmarshallerContext context,GetItemResponse response)
        {
          
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            while (context.Read())
            {
              
              if (context.TestExpression("Item", targetDepth))
              {
                context.Read();
                response.Item = new Dictionary<String,AttributeValue>();
                KeyValueUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new KeyValueUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance());
                while (context.Read())
                {
                  JsonToken token = context.CurrentTokenType;
                  if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart)
                  {
                      continue;
                  }
                  if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd)
                  {
                      break;
                  }
                  KeyValuePair<string, AttributeValue> kvp = unmarshaller.Unmarshall(context);
                    response.Item.Add(kvp.Key, kvp.Value);
                }
                continue;
              }
  
              if (context.TestExpression("ConsumedCapacity", targetDepth))
              {
                context.Read();
                response.ConsumedCapacity = ConsumedCapacityUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
                if (context.CurrentDepth <= originalDepth)
                {                   
                    return;
                }
            }
                        
            return;
        }