public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("TimRoster"); oprot.WriteStructBegin(struc); TField field = new TField(); field.Name = "subscription"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(Subscription); oprot.WriteFieldEnd(); field.Name = "tid"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); Tid.Write(oprot); oprot.WriteFieldEnd(); if (Name != null && __isset.name) { field.Name = "name"; field.Type = TType.String; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteString(Name); oprot.WriteFieldEnd(); } if (ExtraMap != null && __isset.extraMap) { field.Name = "extraMap"; field.Type = TType.Map; field.ID = 4; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); foreach (string _iter97 in ExtraMap.Keys) { oprot.WriteString(_iter97); oprot.WriteString(ExtraMap[_iter97]); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("TimRoom"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Tid != null && __isset.tid) { field.Name = "tid"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); Tid.Write(oprot); oprot.WriteFieldEnd(); } if (FounderTid != null && __isset.founderTid) { field.Name = "founderTid"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); FounderTid.Write(oprot); oprot.WriteFieldEnd(); } if (HostsTid != null && __isset.HostsTid) { field.Name = "HostsTid"; field.Type = TType.List; field.ID = 3; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, HostsTid.Count)); foreach (Tid _iter62 in HostsTid) { _iter62.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (MembersTid != null && __isset.membersTid) { field.Name = "membersTid"; field.Type = TType.List; field.ID = 4; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, MembersTid.Count)); foreach (Tid _iter63 in MembersTid) { _iter63.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (Headurl != null && __isset.headurl) { field.Name = "headurl"; field.Type = TType.String; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteString(Headurl); oprot.WriteFieldEnd(); } if (RoomName != null && __isset.roomName) { field.Name = "roomName"; field.Type = TType.String; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteString(RoomName); oprot.WriteFieldEnd(); } if (Desc != null && __isset.desc) { field.Name = "desc"; field.Type = TType.String; field.ID = 7; oprot.WriteFieldBegin(field); oprot.WriteString(Desc); oprot.WriteFieldEnd(); } if (CreateTime != null && __isset.createTime) { field.Name = "createTime"; field.Type = TType.Struct; field.ID = 8; oprot.WriteFieldBegin(field); CreateTime.Write(oprot); oprot.WriteFieldEnd(); } if (ExtraList != null && __isset.extraList) { field.Name = "extraList"; field.Type = TType.List; field.ID = 9; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); foreach (TimNode _iter64 in ExtraList) { _iter64.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (ExtraMap != null && __isset.extraMap) { field.Name = "extraMap"; field.Type = TType.Map; field.ID = 10; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); foreach (string _iter65 in ExtraMap.Keys) { oprot.WriteString(_iter65); oprot.WriteString(ExtraMap[_iter65]); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }
public void Write(TProtocol oprot) { oprot.IncrementRecursionDepth(); try { TStruct struc = new TStruct("TimUserBean"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Tid != null && __isset.tid) { field.Name = "tid"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); Tid.Write(oprot); oprot.WriteFieldEnd(); } if (Nickname != null && __isset.nickname) { field.Name = "nickname"; field.Type = TType.String; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteString(Nickname); oprot.WriteFieldEnd(); } if (Remarkname != null && __isset.remarkname) { field.Name = "remarkname"; field.Type = TType.String; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteString(Remarkname); oprot.WriteFieldEnd(); } if (Brithday != null && __isset.brithday) { field.Name = "brithday"; field.Type = TType.String; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteString(Brithday); oprot.WriteFieldEnd(); } if (__isset.gender) { field.Name = "gender"; field.Type = TType.I16; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteI16(Gender); oprot.WriteFieldEnd(); } if (Headurl != null && __isset.headurl) { field.Name = "headurl"; field.Type = TType.String; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteString(Headurl); oprot.WriteFieldEnd(); } if (Area != null && __isset.area) { field.Name = "area"; field.Type = TType.Struct; field.ID = 7; oprot.WriteFieldBegin(field); Area.Write(oprot); oprot.WriteFieldEnd(); } if (Headbyte != null && __isset.headbyte) { field.Name = "headbyte"; field.Type = TType.String; field.ID = 8; oprot.WriteFieldBegin(field); oprot.WriteBinary(Headbyte); oprot.WriteFieldEnd(); } if (PhotoBytes != null && __isset.photoBytes) { field.Name = "photoBytes"; field.Type = TType.List; field.ID = 9; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.String, PhotoBytes.Count)); foreach (byte[] _iter46 in PhotoBytes) { oprot.WriteBinary(_iter46); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (ExtraList != null && __isset.extraList) { field.Name = "extraList"; field.Type = TType.List; field.ID = 10; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); foreach (TimNode _iter47 in ExtraList) { _iter47.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (ExtraMap != null && __isset.extraMap) { field.Name = "extraMap"; field.Type = TType.Map; field.ID = 11; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); foreach (string _iter48 in ExtraMap.Keys) { oprot.WriteString(_iter48); oprot.WriteString(ExtraMap[_iter48]); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); } finally { oprot.DecrementRecursionDepth(); } }