Returns information about the ListPartsResult response and response metadata.
Inheritance: Amazon.Runtime.AmazonWebServiceResponse
       public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
       {
           ListPartsResponse response = new ListPartsResponse();       
         
           context.Read();
           int targetDepth = context.CurrentDepth;
           while (context.ReadAtDepth(targetDepth))
           {
             
             if (context.TestExpression("MultipartUploadId", targetDepth))
             {
               response.MultipartUploadId = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("VaultARN", targetDepth))
             {
               response.VaultARN = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("ArchiveDescription", targetDepth))
             {
               response.ArchiveDescription = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("PartSizeInBytes", targetDepth))
             {
               response.PartSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("CreationDate", targetDepth))
             {
               response.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
             if (context.TestExpression("Parts", targetDepth))
             {
               
               var unmarshaller = new ListUnmarshaller<PartListElement,PartListElementUnmarshaller>(
                   PartListElementUnmarshaller.GetInstance());                  
               response.Parts = unmarshaller.Unmarshall(context);
               
               continue;
             }
 
             if (context.TestExpression("Marker", targetDepth))
             {
               response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
               continue;
             }
 
           }
                       
           return response;
       }                        
 public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
 {
   ListPartsResponse response = new ListPartsResponse();          
   
   context.Read();
   
   UnmarshallResult(context,response);
   return response;
 }
Esempio n. 3
0
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            ListPartsResponse response = new ListPartsResponse();

              context.Read();

              response.ListPartsResult = ListPartsResultUnmarshaller.GetInstance().Unmarshall(context);

              return response;
        }
       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;
       }