示例#1
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 0:
         if (field.Type == TType.List) {
           {
             Success = new List<NoteVersionId>();
             TList _list134 = iprot.ReadListBegin();
             for( int _i135 = 0; _i135 < _list134.Count; ++_i135)
             {
               NoteVersionId _elem136 = new NoteVersionId();
               _elem136 = new NoteVersionId();
               _elem136.Read(iprot);
               Success.Add(_elem136);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           UserException = new Evernote.EDAM.Error.EDAMUserException();
           UserException.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           SystemException = new Evernote.EDAM.Error.EDAMSystemException();
           SystemException.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           NotFoundException = new Evernote.EDAM.Error.EDAMNotFoundException();
           NotFoundException.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 0:
         if (field.Type == TType.List) {
           {
             this.success = new List<NoteVersionId>();
             TList _list127 = iprot.ReadListBegin();
             for( int _i128 = 0; _i128 < _list127.Count; ++_i128)
             {
               NoteVersionId _elem129 = new NoteVersionId();
               _elem129 = new NoteVersionId();
               _elem129.Read(iprot);
               this.success.Add(_elem129);
             }
             iprot.ReadListEnd();
           }
           this.__isset.success = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           this.userException = new Evernote.EDAM.Error.EDAMUserException();
           this.userException.Read(iprot);
           this.__isset.userException = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           this.systemException = new Evernote.EDAM.Error.EDAMSystemException();
           this.systemException.Read(iprot);
           this.__isset.systemException = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           this.notFoundException = new Evernote.EDAM.Error.EDAMNotFoundException();
           this.notFoundException.Read(iprot);
           this.__isset.notFoundException = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }