public void Write(TProtocol oprot) { TStruct struc = new TStruct("S64Message"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MVal != null) { field.Name = "m_val"; field.Type = TType.I64; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteI64(MVal.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("Insanity"); oprot.WriteStructBegin(struc); TField field = new TField(); if (UserMap != null) { field.Name = "userMap"; field.Type = TType.Map; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.I32, TType.I64, UserMap.Count)); foreach (Numberz? _iter0 in UserMap.Keys) { oprot.WriteI32((int)_iter0.Value); oprot.WriteI64(UserMap[_iter0].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (Xtructs != null) { field.Name = "xtructs"; field.Type = TType.List; field.ID = 2; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, Xtructs.Count)); foreach (Xtruct _iter1 in Xtructs) { _iter1.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("SimpleClass"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MInt != null) { field.Name = "m_int"; field.Type = TType.I32; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteI32(MInt.Value); oprot.WriteFieldEnd(); } if (MLong != null) { field.Name = "m_long"; field.Type = TType.I64; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteI64(MLong.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("OneOfEach"); oprot.WriteStructBegin(struc); TField field = new TField(); if (ImTrue != null) { field.Name = "im_true"; field.Type = TType.Bool; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteBool(ImTrue.Value); oprot.WriteFieldEnd(); } if (ImFalse != null) { field.Name = "im_false"; field.Type = TType.Bool; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteBool(ImFalse.Value); oprot.WriteFieldEnd(); } if (ABite != null) { field.Name = "a_bite"; field.Type = TType.Byte; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteByte(ABite.Value); oprot.WriteFieldEnd(); } if (Integer16 != null) { field.Name = "integer16"; field.Type = TType.I16; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteI16(Integer16.Value); oprot.WriteFieldEnd(); } if (Integer32 != null) { field.Name = "integer32"; field.Type = TType.I32; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteI32(Integer32.Value); oprot.WriteFieldEnd(); } if (Integer64 != null) { field.Name = "integer64"; field.Type = TType.I64; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteI64(Integer64.Value); oprot.WriteFieldEnd(); } if (DoublePrecision != null) { field.Name = "double_precision"; field.Type = TType.Double; field.ID = 7; oprot.WriteFieldBegin(field); oprot.WriteDouble(DoublePrecision.Value); oprot.WriteFieldEnd(); } if (SomeCharacters != null) { field.Name = "some_characters"; field.Type = TType.String; field.ID = 8; oprot.WriteFieldBegin(field); oprot.WriteString(SomeCharacters); oprot.WriteFieldEnd(); } if (ZomgUnicode != null) { field.Name = "zomg_unicode"; field.Type = TType.String; field.ID = 9; oprot.WriteFieldBegin(field); oprot.WriteString(ZomgUnicode); oprot.WriteFieldEnd(); } if (WhatWho != null) { field.Name = "what_who"; field.Type = TType.Bool; field.ID = 10; oprot.WriteFieldBegin(field); oprot.WriteBool(WhatWho.Value); oprot.WriteFieldEnd(); } if (Base64 != null) { field.Name = "base64"; field.Type = TType.String; field.ID = 11; oprot.WriteFieldBegin(field); oprot.WriteBinary(Base64); oprot.WriteFieldEnd(); } if (ByteList != null) { field.Name = "byte_list"; field.Type = TType.List; field.ID = 12; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Byte, ByteList.Count)); foreach (sbyte? _iter0 in ByteList) { oprot.WriteByte(_iter0.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (I16List != null) { field.Name = "i16_list"; field.Type = TType.List; field.ID = 13; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I16, I16List.Count)); foreach (short? _iter1 in I16List) { oprot.WriteI16(_iter1.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (I64List != null) { field.Name = "i64_list"; field.Type = TType.List; field.ID = 14; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I64, I64List.Count)); foreach (long? _iter2 in I64List) { oprot.WriteI64(_iter2.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("Xtruct"); oprot.WriteStructBegin(struc); TField field = new TField(); if (StringThing != null) { field.Name = "string_thing"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(StringThing); oprot.WriteFieldEnd(); } if (ByteThing != null) { field.Name = "byte_thing"; field.Type = TType.Byte; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteByte(ByteThing.Value); oprot.WriteFieldEnd(); } if (I32Thing != null) { field.Name = "i32_thing"; field.Type = TType.I32; field.ID = 9; oprot.WriteFieldBegin(field); oprot.WriteI32(I32Thing.Value); oprot.WriteFieldEnd(); } if (I64Thing != null) { field.Name = "i64_thing"; field.Type = TType.I64; field.ID = 11; oprot.WriteFieldBegin(field); oprot.WriteI64(I64Thing.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("VersioningTestV2"); oprot.WriteStructBegin(struc); TField field = new TField(); if (BeginInBoth != null) { field.Name = "begin_in_both"; field.Type = TType.I32; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteI32(BeginInBoth.Value); oprot.WriteFieldEnd(); } if (Newint != null) { field.Name = "newint"; field.Type = TType.I32; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteI32(Newint.Value); oprot.WriteFieldEnd(); } if (Newbyte != null) { field.Name = "newbyte"; field.Type = TType.Byte; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteByte(Newbyte.Value); oprot.WriteFieldEnd(); } if (Newshort != null) { field.Name = "newshort"; field.Type = TType.I16; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteI16(Newshort.Value); oprot.WriteFieldEnd(); } if (Newlong != null) { field.Name = "newlong"; field.Type = TType.I64; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteI64(Newlong.Value); oprot.WriteFieldEnd(); } if (Newdouble != null) { field.Name = "newdouble"; field.Type = TType.Double; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteDouble(Newdouble.Value); oprot.WriteFieldEnd(); } if (Newstruct != null) { field.Name = "newstruct"; field.Type = TType.Struct; field.ID = 7; oprot.WriteFieldBegin(field); Newstruct.Write(oprot); oprot.WriteFieldEnd(); } if (Newlist != null) { field.Name = "newlist"; field.Type = TType.List; field.ID = 8; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I32, Newlist.Count)); foreach (int? _iter0 in Newlist) { oprot.WriteI32(_iter0.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (Newset != null) { field.Name = "newset"; field.Type = TType.Set; field.ID = 9; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.I32, Newset.Count)); foreach (int? _iter1 in Newset) { oprot.WriteI32(_iter1.Value); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (Newmap != null) { field.Name = "newmap"; field.Type = TType.Map; field.ID = 10; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.I32, TType.I32, Newmap.Count)); foreach (int? _iter2 in Newmap.Keys) { oprot.WriteI32(_iter2.Value); oprot.WriteI32(Newmap[_iter2].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (Newstring != null) { field.Name = "newstring"; field.Type = TType.String; field.ID = 11; oprot.WriteFieldBegin(field); oprot.WriteString(Newstring); oprot.WriteFieldEnd(); } if (EndInBoth != null) { field.Name = "end_in_both"; field.Type = TType.I32; field.ID = 12; oprot.WriteFieldBegin(field); oprot.WriteI32(EndInBoth.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("CompactProtoTestStruct"); oprot.WriteStructBegin(struc); TField field = new TField(); if (AByte != null) { field.Name = "a_byte"; field.Type = TType.Byte; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteByte(AByte.Value); oprot.WriteFieldEnd(); } if (AI16 != null) { field.Name = "a_i16"; field.Type = TType.I16; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteI16(AI16.Value); oprot.WriteFieldEnd(); } if (AI32 != null) { field.Name = "a_i32"; field.Type = TType.I32; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteI32(AI32.Value); oprot.WriteFieldEnd(); } if (AI64 != null) { field.Name = "a_i64"; field.Type = TType.I64; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteI64(AI64.Value); oprot.WriteFieldEnd(); } if (ADouble != null) { field.Name = "a_double"; field.Type = TType.Double; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteDouble(ADouble.Value); oprot.WriteFieldEnd(); } if (AString != null) { field.Name = "a_string"; field.Type = TType.String; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteString(AString); oprot.WriteFieldEnd(); } if (ABinary != null) { field.Name = "a_binary"; field.Type = TType.String; field.ID = 7; oprot.WriteFieldBegin(field); oprot.WriteBinary(ABinary); oprot.WriteFieldEnd(); } if (TrueField != null) { field.Name = "true_field"; field.Type = TType.Bool; field.ID = 8; oprot.WriteFieldBegin(field); oprot.WriteBool(TrueField.Value); oprot.WriteFieldEnd(); } if (FalseField != null) { field.Name = "false_field"; field.Type = TType.Bool; field.ID = 9; oprot.WriteFieldBegin(field); oprot.WriteBool(FalseField.Value); oprot.WriteFieldEnd(); } if (EmptyStructField != null) { field.Name = "empty_struct_field"; field.Type = TType.Struct; field.ID = 10; oprot.WriteFieldBegin(field); EmptyStructField.Write(oprot); oprot.WriteFieldEnd(); } if (ByteList != null) { field.Name = "byte_list"; field.Type = TType.List; field.ID = 11; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Byte, ByteList.Count)); foreach (sbyte? _iter0 in ByteList) { oprot.WriteByte(_iter0.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (I16List != null) { field.Name = "i16_list"; field.Type = TType.List; field.ID = 12; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I16, I16List.Count)); foreach (short? _iter1 in I16List) { oprot.WriteI16(_iter1.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (I32List != null) { field.Name = "i32_list"; field.Type = TType.List; field.ID = 13; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I32, I32List.Count)); foreach (int? _iter2 in I32List) { oprot.WriteI32(_iter2.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (I64List != null) { field.Name = "i64_list"; field.Type = TType.List; field.ID = 14; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I64, I64List.Count)); foreach (long? _iter3 in I64List) { oprot.WriteI64(_iter3.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (DoubleList != null) { field.Name = "double_list"; field.Type = TType.List; field.ID = 15; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Double, DoubleList.Count)); foreach (double? _iter4 in DoubleList) { oprot.WriteDouble(_iter4.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (StringList != null) { field.Name = "string_list"; field.Type = TType.List; field.ID = 16; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.String, StringList.Count)); foreach (string _iter5 in StringList) { oprot.WriteString(_iter5); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (BinaryList != null) { field.Name = "binary_list"; field.Type = TType.List; field.ID = 17; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.String, BinaryList.Count)); foreach (byte[] _iter6 in BinaryList) { oprot.WriteBinary(_iter6); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (BooleanList != null) { field.Name = "boolean_list"; field.Type = TType.List; field.ID = 18; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Bool, BooleanList.Count)); foreach (bool? _iter7 in BooleanList) { oprot.WriteBool(_iter7.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (StructList != null) { field.Name = "struct_list"; field.Type = TType.List; field.ID = 19; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, StructList.Count)); foreach (Empty _iter8 in StructList) { _iter8.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (ByteSet != null) { field.Name = "byte_set"; field.Type = TType.Set; field.ID = 20; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.Byte, ByteSet.Count)); foreach (sbyte? _iter9 in ByteSet) { oprot.WriteByte(_iter9.Value); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (I16Set != null) { field.Name = "i16_set"; field.Type = TType.Set; field.ID = 21; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.I16, I16Set.Count)); foreach (short? _iter10 in I16Set) { oprot.WriteI16(_iter10.Value); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (I32Set != null) { field.Name = "i32_set"; field.Type = TType.Set; field.ID = 22; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.I32, I32Set.Count)); foreach (int? _iter11 in I32Set) { oprot.WriteI32(_iter11.Value); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (I64Set != null) { field.Name = "i64_set"; field.Type = TType.Set; field.ID = 23; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.I64, I64Set.Count)); foreach (long? _iter12 in I64Set) { oprot.WriteI64(_iter12.Value); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (DoubleSet != null) { field.Name = "double_set"; field.Type = TType.Set; field.ID = 24; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.Double, DoubleSet.Count)); foreach (double? _iter13 in DoubleSet) { oprot.WriteDouble(_iter13.Value); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (StringSet != null) { field.Name = "string_set"; field.Type = TType.Set; field.ID = 25; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.String, StringSet.Count)); foreach (string _iter14 in StringSet) { oprot.WriteString(_iter14); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (BinarySet != null) { field.Name = "binary_set"; field.Type = TType.Set; field.ID = 26; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.String, BinarySet.Count)); foreach (byte[] _iter15 in BinarySet) { oprot.WriteBinary(_iter15); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (BooleanSet != null) { field.Name = "boolean_set"; field.Type = TType.Set; field.ID = 27; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.Bool, BooleanSet.Count)); foreach (bool? _iter16 in BooleanSet) { oprot.WriteBool(_iter16.Value); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (StructSet != null) { field.Name = "struct_set"; field.Type = TType.Set; field.ID = 28; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.Struct, StructSet.Count)); foreach (Empty _iter17 in StructSet) { _iter17.Write(oprot); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (ByteByteMap != null) { field.Name = "byte_byte_map"; field.Type = TType.Map; field.ID = 29; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.Byte, ByteByteMap.Count)); foreach (sbyte? _iter18 in ByteByteMap.Keys) { oprot.WriteByte(_iter18.Value); oprot.WriteByte(ByteByteMap[_iter18].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (I16ByteMap != null) { field.Name = "i16_byte_map"; field.Type = TType.Map; field.ID = 30; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.I16, TType.Byte, I16ByteMap.Count)); foreach (short? _iter19 in I16ByteMap.Keys) { oprot.WriteI16(_iter19.Value); oprot.WriteByte(I16ByteMap[_iter19].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (I32ByteMap != null) { field.Name = "i32_byte_map"; field.Type = TType.Map; field.ID = 31; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.I32, TType.Byte, I32ByteMap.Count)); foreach (int? _iter20 in I32ByteMap.Keys) { oprot.WriteI32(_iter20.Value); oprot.WriteByte(I32ByteMap[_iter20].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (I64ByteMap != null) { field.Name = "i64_byte_map"; field.Type = TType.Map; field.ID = 32; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.I64, TType.Byte, I64ByteMap.Count)); foreach (long? _iter21 in I64ByteMap.Keys) { oprot.WriteI64(_iter21.Value); oprot.WriteByte(I64ByteMap[_iter21].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (DoubleByteMap != null) { field.Name = "double_byte_map"; field.Type = TType.Map; field.ID = 33; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Double, TType.Byte, DoubleByteMap.Count)); foreach (double? _iter22 in DoubleByteMap.Keys) { oprot.WriteDouble(_iter22.Value); oprot.WriteByte(DoubleByteMap[_iter22].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (StringByteMap != null) { field.Name = "string_byte_map"; field.Type = TType.Map; field.ID = 34; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.Byte, StringByteMap.Count)); foreach (string _iter23 in StringByteMap.Keys) { oprot.WriteString(_iter23); oprot.WriteByte(StringByteMap[_iter23].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (BinaryByteMap != null) { field.Name = "binary_byte_map"; field.Type = TType.Map; field.ID = 35; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.Byte, BinaryByteMap.Count)); foreach (byte[] _iter24 in BinaryByteMap.Keys) { oprot.WriteBinary(_iter24); oprot.WriteByte(BinaryByteMap[_iter24].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (BooleanByteMap != null) { field.Name = "boolean_byte_map"; field.Type = TType.Map; field.ID = 36; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Bool, TType.Byte, BooleanByteMap.Count)); foreach (bool? _iter25 in BooleanByteMap.Keys) { oprot.WriteBool(_iter25.Value); oprot.WriteByte(BooleanByteMap[_iter25].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteI16Map != null) { field.Name = "byte_i16_map"; field.Type = TType.Map; field.ID = 37; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.I16, ByteI16Map.Count)); foreach (sbyte? _iter26 in ByteI16Map.Keys) { oprot.WriteByte(_iter26.Value); oprot.WriteI16(ByteI16Map[_iter26].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteI32Map != null) { field.Name = "byte_i32_map"; field.Type = TType.Map; field.ID = 38; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.I32, ByteI32Map.Count)); foreach (sbyte? _iter27 in ByteI32Map.Keys) { oprot.WriteByte(_iter27.Value); oprot.WriteI32(ByteI32Map[_iter27].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteI64Map != null) { field.Name = "byte_i64_map"; field.Type = TType.Map; field.ID = 39; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.I64, ByteI64Map.Count)); foreach (sbyte? _iter28 in ByteI64Map.Keys) { oprot.WriteByte(_iter28.Value); oprot.WriteI64(ByteI64Map[_iter28].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteDoubleMap != null) { field.Name = "byte_double_map"; field.Type = TType.Map; field.ID = 40; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.Double, ByteDoubleMap.Count)); foreach (sbyte? _iter29 in ByteDoubleMap.Keys) { oprot.WriteByte(_iter29.Value); oprot.WriteDouble(ByteDoubleMap[_iter29].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteStringMap != null) { field.Name = "byte_string_map"; field.Type = TType.Map; field.ID = 41; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.String, ByteStringMap.Count)); foreach (sbyte? _iter30 in ByteStringMap.Keys) { oprot.WriteByte(_iter30.Value); oprot.WriteString(ByteStringMap[_iter30]); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteBinaryMap != null) { field.Name = "byte_binary_map"; field.Type = TType.Map; field.ID = 42; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.String, ByteBinaryMap.Count)); foreach (sbyte? _iter31 in ByteBinaryMap.Keys) { oprot.WriteByte(_iter31.Value); oprot.WriteBinary(ByteBinaryMap[_iter31]); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteBooleanMap != null) { field.Name = "byte_boolean_map"; field.Type = TType.Map; field.ID = 43; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.Bool, ByteBooleanMap.Count)); foreach (sbyte? _iter32 in ByteBooleanMap.Keys) { oprot.WriteByte(_iter32.Value); oprot.WriteBool(ByteBooleanMap[_iter32].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ListByteMap != null) { field.Name = "list_byte_map"; field.Type = TType.Map; field.ID = 44; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.List, TType.Byte, ListByteMap.Count)); foreach (List<sbyte?> _iter33 in ListByteMap.Keys) { { oprot.WriteListBegin(new TList(TType.Byte, _iter33.Count)); foreach (sbyte? _iter34 in _iter33) { oprot.WriteByte(_iter34.Value); } oprot.WriteListEnd(); } oprot.WriteByte(ListByteMap[_iter33].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (SetByteMap != null) { field.Name = "set_byte_map"; field.Type = TType.Map; field.ID = 45; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Set, TType.Byte, SetByteMap.Count)); foreach (HashSet<sbyte?> _iter35 in SetByteMap.Keys) { { oprot.WriteSetBegin(new TSet(TType.Byte, _iter35.Count)); foreach (sbyte? _iter36 in _iter35) { oprot.WriteByte(_iter36.Value); } oprot.WriteSetEnd(); } oprot.WriteByte(SetByteMap[_iter35].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (MapByteMap != null) { field.Name = "map_byte_map"; field.Type = TType.Map; field.ID = 46; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Map, TType.Byte, MapByteMap.Count)); foreach (Dictionary<sbyte?, sbyte?> _iter37 in MapByteMap.Keys) { { oprot.WriteMapBegin(new TMap(TType.Byte, TType.Byte, _iter37.Count)); foreach (sbyte? _iter38 in _iter37.Keys) { oprot.WriteByte(_iter38.Value); oprot.WriteByte(_iter37[_iter38].Value); } oprot.WriteMapEnd(); } oprot.WriteByte(MapByteMap[_iter37].Value); } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteMapMap != null) { field.Name = "byte_map_map"; field.Type = TType.Map; field.ID = 47; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.Map, ByteMapMap.Count)); foreach (sbyte? _iter39 in ByteMapMap.Keys) { oprot.WriteByte(_iter39.Value); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.Byte, ByteMapMap[_iter39].Count)); foreach (sbyte? _iter40 in ByteMapMap[_iter39].Keys) { oprot.WriteByte(_iter40.Value); oprot.WriteByte(ByteMapMap[_iter39][_iter40].Value); } oprot.WriteMapEnd(); } } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteSetMap != null) { field.Name = "byte_set_map"; field.Type = TType.Map; field.ID = 48; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.Set, ByteSetMap.Count)); foreach (sbyte? _iter41 in ByteSetMap.Keys) { oprot.WriteByte(_iter41.Value); { oprot.WriteSetBegin(new TSet(TType.Byte, ByteSetMap[_iter41].Count)); foreach (sbyte? _iter42 in ByteSetMap[_iter41]) { oprot.WriteByte(_iter42.Value); } oprot.WriteSetEnd(); } } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (ByteListMap != null) { field.Name = "byte_list_map"; field.Type = TType.Map; field.ID = 49; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.Byte, TType.List, ByteListMap.Count)); foreach (sbyte? _iter43 in ByteListMap.Keys) { oprot.WriteByte(_iter43.Value); { oprot.WriteListBegin(new TList(TType.Byte, ByteListMap[_iter43].Count)); foreach (sbyte? _iter44 in ByteListMap[_iter43]) { oprot.WriteByte(_iter44.Value); } oprot.WriteListEnd(); } } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("PrimitiveMessage"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MBool != null) { field.Name = "m_bool"; field.Type = TType.Bool; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteBool(MBool.Value); oprot.WriteFieldEnd(); } if (MByte != null) { field.Name = "m_byte"; field.Type = TType.Byte; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteByte(MByte.Value); oprot.WriteFieldEnd(); } if (MShort != null) { field.Name = "m_short"; field.Type = TType.I16; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteI16(MShort.Value); oprot.WriteFieldEnd(); } if (MInt != null) { field.Name = "m_int"; field.Type = TType.I32; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteI32(MInt.Value); oprot.WriteFieldEnd(); } if (MLong != null) { field.Name = "m_long"; field.Type = TType.I64; field.ID = 5; oprot.WriteFieldBegin(field); oprot.WriteI64(MLong.Value); oprot.WriteFieldEnd(); } if (MDouble != null) { field.Name = "m_double"; field.Type = TType.Double; field.ID = 6; oprot.WriteFieldBegin(field); oprot.WriteDouble(MDouble.Value); oprot.WriteFieldEnd(); } if (MEnum != null) { field.Name = "m_enum"; field.Type = TType.I32; field.ID = 7; oprot.WriteFieldBegin(field); oprot.WriteI32((int)MEnum.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }