public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_threadId = false; 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) { ThreadId = iprot.ReadString(); isset_threadId = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Mid = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { FromTid = new Tid(); FromTid.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { ToTid = new Tid(); ToTid.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { Body = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { Type = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.I16) { MsgType = iprot.ReadI16(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { Offline = new TimTime(); Offline.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Struct) { LeaguerTid = new Tid(); LeaguerTid.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.List) { { ExtraList = new List <TimNode>(); TList _list75 = iprot.ReadListBegin(); for (int _i76 = 0; _i76 < _list75.Count; ++_i76) { TimNode _elem77; _elem77 = new TimNode(); _elem77.Read(iprot); ExtraList.Add(_elem77); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.String) { Timestamp = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.Struct) { Error = new TimError(); Error.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.Map) { { ExtraMap = new Dictionary <string, string>(); TMap _map78 = iprot.ReadMapBegin(); for (int _i79 = 0; _i79 < _map78.Count; ++_i79) { string _key80; string _val81; _key80 = iprot.ReadString(); _val81 = iprot.ReadString(); ExtraMap[_key80] = _val81; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.I16) { Readstatus = iprot.ReadI16(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_threadId) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Tid = new Tid(); Tid.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { FounderTid = new Tid(); FounderTid.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { HostsTid = new List <Tid>(); TList _list49 = iprot.ReadListBegin(); for (int _i50 = 0; _i50 < _list49.Count; ++_i50) { Tid _elem51; _elem51 = new Tid(); _elem51.Read(iprot); HostsTid.Add(_elem51); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { MembersTid = new List <Tid>(); TList _list52 = iprot.ReadListBegin(); for (int _i53 = 0; _i53 < _list52.Count; ++_i53) { Tid _elem54; _elem54 = new Tid(); _elem54.Read(iprot); MembersTid.Add(_elem54); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { Headurl = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { RoomName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { Desc = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { CreateTime = new TimTime(); CreateTime.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.List) { { ExtraList = new List <TimNode>(); TList _list55 = iprot.ReadListBegin(); for (int _i56 = 0; _i56 < _list55.Count; ++_i56) { TimNode _elem57; _elem57 = new TimNode(); _elem57.Read(iprot); ExtraList.Add(_elem57); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Map) { { ExtraMap = new Dictionary <string, string>(); TMap _map58 = iprot.ReadMapBegin(); for (int _i59 = 0; _i59 < _map58.Count; ++_i59) { string _key60; string _val61; _key60 = iprot.ReadString(); _val61 = iprot.ReadString(); ExtraMap[_key60] = _val61; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }