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.Map) { { Name = new Dictionary <string, string>(); TMap _map33 = iprot.ReadMapBegin(); for (int _i34 = 0; _i34 < _map33.Count; ++_i34) { string _key35; string _val36; _key35 = iprot.ReadString(); _val36 = iprot.ReadString(); Name[_key35] = _val36; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { ProviderId = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I32) { Os = (THDeviceOs)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { DisplayOrder = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.String) { IconUrl = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Bool) { Enabled = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Bool) { SupportsInviteText = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Bool) { SupportsInviteImageUrl = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Bool) { SupportsInviteSubject = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { Properties = new THInviteProperties(); Properties.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.Struct) { InviteContent = new THInviteContent(); InviteContent.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.Bool) { SupportsGif = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.Bool) { SupportsVideo = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } 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) { DefaultInviteContent = new THInviteContent(); DefaultInviteContent.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Providers = new List <THInviteProvider>(); TList _list38 = iprot.ReadListBegin(); for (int _i39 = 0; _i39 < _list38.Count; ++_i39) { THInviteProvider _elem40; _elem40 = new THInviteProvider(); _elem40.Read(iprot); Providers.Add(_elem40); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }