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.Struct) {
           Success = new World();
           Success.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Aex = new org.phybros.thrift.EAuthException();
           Aex.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Dex = new org.phybros.thrift.EDataException();
           Dex.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) {
           {
             Success = new List<World>();
             TList _list73 = iprot.ReadListBegin();
             for( int _i74 = 0; _i74 < _list73.Count; ++_i74)
             {
               World _elem75 = new World();
               _elem75 = new World();
               _elem75.Read(iprot);
               Success.Add(_elem75);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Aex = new org.phybros.thrift.EAuthException();
           Aex.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
示例#3
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.String) {
           Name = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             OfflinePlayers = new List<OfflinePlayer>();
             TList _list17 = iprot.ReadListBegin();
             for( int _i18 = 0; _i18 < _list17.Count; ++_i18)
             {
               OfflinePlayer _elem19 = new OfflinePlayer();
               _elem19 = new OfflinePlayer();
               _elem19.Read(iprot);
               OfflinePlayers.Add(_elem19);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.List) {
           {
             OnlinePlayers = new List<Player>();
             TList _list20 = iprot.ReadListBegin();
             for( int _i21 = 0; _i21 < _list20.Count; ++_i21)
             {
               Player _elem22 = new Player();
               _elem22 = new Player();
               _elem22.Read(iprot);
               OnlinePlayers.Add(_elem22);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           Version = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.String) {
           BukkitVersion = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.I32) {
           MaxPlayers = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.String) {
           Ip = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.I32) {
           Port = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.Bool) {
           AllowFlight = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.Bool) {
           AllowNether = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.Bool) {
           AllowEnd = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.List) {
           {
             Whitelist = new List<OfflinePlayer>();
             TList _list23 = iprot.ReadListBegin();
             for( int _i24 = 0; _i24 < _list23.Count; ++_i24)
             {
               OfflinePlayer _elem25 = new OfflinePlayer();
               _elem25 = new OfflinePlayer();
               _elem25.Read(iprot);
               Whitelist.Add(_elem25);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.List) {
           {
             BannedPlayers = new List<OfflinePlayer>();
             TList _list26 = iprot.ReadListBegin();
             for( int _i27 = 0; _i27 < _list26.Count; ++_i27)
             {
               OfflinePlayer _elem28 = new OfflinePlayer();
               _elem28 = new OfflinePlayer();
               _elem28.Read(iprot);
               BannedPlayers.Add(_elem28);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 14:
         if (field.Type == TType.List) {
           {
             BannedIps = new List<string>();
             TList _list29 = iprot.ReadListBegin();
             for( int _i30 = 0; _i30 < _list29.Count; ++_i30)
             {
               string _elem31 = null;
               _elem31 = iprot.ReadString();
               BannedIps.Add(_elem31);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.List) {
           {
             Worlds = new List<World>();
             TList _list32 = iprot.ReadListBegin();
             for( int _i33 = 0; _i33 < _list32.Count; ++_i33)
             {
               World _elem34 = new World();
               _elem34 = new World();
               _elem34.Read(iprot);
               Worlds.Add(_elem34);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }