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<ChatUserBlockedInstance>(); TList _list352 = iprot.ReadListBegin(); for( int _i353 = 0; _i353 < _list352.Count; ++_i353) { ChatUserBlockedInstance _elem354; _elem354 = new ChatUserBlockedInstance(); _elem354.Read(iprot); Success.Add(_elem354); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { Ex = new ChatUserInfoException(); Ex.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { Se = new SessionException(); Se.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 1: if (field.Type == TType.List) { { GroupIds = new List <string>(); TList _list76 = iprot.ReadListBegin(); for (int _i77 = 0; _i77 < _list76.Count; ++_i77) { string _elem78; _elem78 = iprot.ReadString(); GroupIds.Add(_elem78); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { BlockedInstance = new List <ChatBlockedInstance>(); TList _list79 = iprot.ReadListBegin(); for (int _i80 = 0; _i80 < _list79.Count; ++_i80) { ChatBlockedInstance _elem81; _elem81 = new ChatBlockedInstance(); _elem81.Read(iprot); BlockedInstance.Add(_elem81); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { MutedInstance = new List <ChatMutedInstance>(); TList _list82 = iprot.ReadListBegin(); for (int _i83 = 0; _i83 < _list82.Count; ++_i83) { ChatMutedInstance _elem84; _elem84 = new ChatMutedInstance(); _elem84.Read(iprot); MutedInstance.Add(_elem84); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { UserBlockedInstance = new List <ChatUserBlockedInstance>(); TList _list85 = iprot.ReadListBegin(); for (int _i86 = 0; _i86 < _list85.Count; ++_i86) { ChatUserBlockedInstance _elem87; _elem87 = new ChatUserBlockedInstance(); _elem87.Read(iprot); UserBlockedInstance.Add(_elem87); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { MuteUsers = new List <ChatMutedUser>(); TList _list88 = iprot.ReadListBegin(); for (int _i89 = 0; _i89 < _list88.Count; ++_i89) { ChatMutedUser _elem90; _elem90 = new ChatMutedUser(); _elem90.Read(iprot); MuteUsers.Add(_elem90); } iprot.ReadListEnd(); } } 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 1: if (field.Type == TType.List) { { GroupIds = new List<string>(); TList _list76 = iprot.ReadListBegin(); for( int _i77 = 0; _i77 < _list76.Count; ++_i77) { string _elem78; _elem78 = iprot.ReadString(); GroupIds.Add(_elem78); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { BlockedInstance = new List<ChatBlockedInstance>(); TList _list79 = iprot.ReadListBegin(); for( int _i80 = 0; _i80 < _list79.Count; ++_i80) { ChatBlockedInstance _elem81; _elem81 = new ChatBlockedInstance(); _elem81.Read(iprot); BlockedInstance.Add(_elem81); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { MutedInstance = new List<ChatMutedInstance>(); TList _list82 = iprot.ReadListBegin(); for( int _i83 = 0; _i83 < _list82.Count; ++_i83) { ChatMutedInstance _elem84; _elem84 = new ChatMutedInstance(); _elem84.Read(iprot); MutedInstance.Add(_elem84); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { UserBlockedInstance = new List<ChatUserBlockedInstance>(); TList _list85 = iprot.ReadListBegin(); for( int _i86 = 0; _i86 < _list85.Count; ++_i86) { ChatUserBlockedInstance _elem87; _elem87 = new ChatUserBlockedInstance(); _elem87.Read(iprot); UserBlockedInstance.Add(_elem87); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.List) { { MuteUsers = new List<ChatMutedUser>(); TList _list88 = iprot.ReadListBegin(); for( int _i89 = 0; _i89 < _list88.Count; ++_i89) { ChatMutedUser _elem90; _elem90 = new ChatMutedUser(); _elem90.Read(iprot); MuteUsers.Add(_elem90); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }