Esempio n. 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 1:
                    if (field.Type == TType.List)
                    {
                        {
                            Mentions = new List <ThriftMention>();
                            TList _list4 = iprot.ReadListBegin();
                            for (int _i5 = 0; _i5 < _list4.Count; ++_i5)
                            {
                                ThriftMention _elem6 = new ThriftMention();
                                _elem6 = new ThriftMention();
                                _elem6.Read(iprot);
                                Mentions.Add(_elem6);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
Esempio n. 2
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 1:
         if (field.Type == TType.List) {
           {
             Mentions = new List<ThriftMention>();
             TList _list4 = iprot.ReadListBegin();
             for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
             {
               ThriftMention _elem6 = new ThriftMention();
               _elem6 = new ThriftMention();
               _elem6.Read(iprot);
               Mentions.Add(_elem6);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }