Amazon.Glacier.Model.Internal.MarshallTransformations.ListPartsResponseUnmarshaller.UnmarshallResult C# (CSharp) Method

UnmarshallResult() private static method

private static UnmarshallResult ( JsonUnmarshallerContext context, ListPartsResponse response ) : void
context Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
response Amazon.Glacier.Model.ListPartsResponse
return void
        private static void UnmarshallResult(JsonUnmarshallerContext context,ListPartsResponse response)
        {
          
            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            while (context.Read())
            {
              
              if (context.TestExpression("MultipartUploadId", targetDepth))
              {
                context.Read();
                response.MultipartUploadId = StringUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
              if (context.TestExpression("VaultARN", targetDepth))
              {
                context.Read();
                response.VaultARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
              if (context.TestExpression("ArchiveDescription", targetDepth))
              {
                context.Read();
                response.ArchiveDescription = StringUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
              if (context.TestExpression("PartSizeInBytes", targetDepth))
              {
                context.Read();
                response.PartSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
              if (context.TestExpression("CreationDate", targetDepth))
              {
                context.Read();
                response.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
                continue;
              }
  
              if (context.TestExpression("Parts", targetDepth))
              {
                context.Read();
                
                if (context.CurrentTokenType == JsonToken.Null)
                {
                    response.Parts = null;
                    continue;
                }
                  response.Parts = new List<PartListElement>();
                  PartListElementUnmarshaller unmarshaller = PartListElementUnmarshaller.GetInstance();
                while (context.Read())
                {
                  JsonToken token = context.CurrentTokenType;                
                  if (token == JsonToken.ArrayStart)
                  {
                    continue;
                  }
                  if (token == JsonToken.ArrayEnd)
                  {
                    break;
                  }
                   response.Parts.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;
        }