public void Write(TProtocol oprot) { TStruct struc = new TStruct("ListBonks"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Bonk != null) { field.Name = "bonk"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, Bonk.Count)); foreach (Bonk _iter0 in Bonk) { _iter0.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("IntListMessage"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MIntList != null) { field.Name = "m_intList"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I32, MIntList.Count)); foreach (int? _iter0 in MIntList) { oprot.WriteI32(_iter0.Value); } oprot.WriteListEnd(); } 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("NestedListsI32x2"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Integerlist != null) { field.Name = "integerlist"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.List, Integerlist.Count)); foreach (List<int?> _iter0 in Integerlist) { { oprot.WriteListBegin(new TList(TType.I32, _iter0.Count)); foreach (int? _iter1 in _iter0) { oprot.WriteI32(_iter1.Value); } oprot.WriteListEnd(); } } oprot.WriteListEnd(); } 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("HolyMoley"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Big != null) { field.Name = "big"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Struct, Big.Count)); foreach (OneOfEach _iter0 in Big) { _iter0.Write(oprot); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (Contain != null) { field.Name = "contain"; field.Type = TType.Set; field.ID = 2; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.List, Contain.Count)); foreach (List<string> _iter1 in Contain) { { oprot.WriteListBegin(new TList(TType.String, _iter1.Count)); foreach (string _iter2 in _iter1) { oprot.WriteString(_iter2); } oprot.WriteListEnd(); } } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (Bonks != null) { field.Name = "bonks"; field.Type = TType.Map; field.ID = 3; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.String, TType.List, Bonks.Count)); foreach (string _iter3 in Bonks.Keys) { oprot.WriteString(_iter3); { oprot.WriteListBegin(new TList(TType.Struct, Bonks[_iter3].Count)); foreach (Bonk _iter4 in Bonks[_iter3]) { _iter4.Write(oprot); } oprot.WriteListEnd(); } } oprot.WriteMapEnd(); } 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("NestedListsBonk"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Bonk != null) { field.Name = "bonk"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.List, Bonk.Count)); foreach (List<List<Bonk>> _iter0 in Bonk) { { oprot.WriteListBegin(new TList(TType.List, _iter0.Count)); foreach (List<Bonk> _iter1 in _iter0) { { oprot.WriteListBegin(new TList(TType.Struct, _iter1.Count)); foreach (Bonk _iter2 in _iter1) { _iter2.Write(oprot); } oprot.WriteListEnd(); } } oprot.WriteListEnd(); } } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("NestedMixedx2"); oprot.WriteStructBegin(struc); TField field = new TField(); if (IntSetList != null) { field.Name = "int_set_list"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Set, IntSetList.Count)); foreach (HashSet<int?> _iter0 in IntSetList) { { oprot.WriteSetBegin(new TSet(TType.I32, _iter0.Count)); foreach (int? _iter1 in _iter0) { oprot.WriteI32(_iter1.Value); } oprot.WriteSetEnd(); } } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (MapIntStrset != null) { field.Name = "map_int_strset"; field.Type = TType.Map; field.ID = 2; oprot.WriteFieldBegin(field); { oprot.WriteMapBegin(new TMap(TType.I32, TType.Set, MapIntStrset.Count)); foreach (int? _iter2 in MapIntStrset.Keys) { oprot.WriteI32(_iter2.Value); { oprot.WriteSetBegin(new TSet(TType.String, MapIntStrset[_iter2].Count)); foreach (string _iter3 in MapIntStrset[_iter2]) { oprot.WriteString(_iter3); } oprot.WriteSetEnd(); } } oprot.WriteMapEnd(); } oprot.WriteFieldEnd(); } if (MapIntStrsetList != null) { field.Name = "map_int_strset_list"; field.Type = TType.List; field.ID = 3; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Map, MapIntStrsetList.Count)); foreach (Dictionary<int?, HashSet<string>> _iter4 in MapIntStrsetList) { { oprot.WriteMapBegin(new TMap(TType.I32, TType.Set, _iter4.Count)); foreach (int? _iter5 in _iter4.Keys) { oprot.WriteI32(_iter5.Value); { oprot.WriteSetBegin(new TSet(TType.String, _iter4[_iter5].Count)); foreach (string _iter6 in _iter4[_iter5]) { oprot.WriteString(_iter6); } oprot.WriteSetEnd(); } } oprot.WriteMapEnd(); } } oprot.WriteListEnd(); } 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("CrazyNesting"); oprot.WriteStructBegin(struc); if (ListField == null) throw new TProtocolException(TProtocolException.INVALID_DATA, "missing required property 'ListField'"); TField field = new TField(); if (StringField != null) { field.Name = "string_field"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(StringField); oprot.WriteFieldEnd(); } if (SetField != null) { field.Name = "set_field"; field.Type = TType.Set; field.ID = 2; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.Struct, SetField.Count)); foreach (Insanity _iter0 in SetField) { _iter0.Write(oprot); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (ListField != null) { field.Name = "list_field"; field.Type = TType.List; field.ID = 3; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.Map, ListField.Count)); foreach (Dictionary<HashSet<int?>, Dictionary<int?, HashSet<List<Dictionary<Insanity, string>>>>> _iter1 in ListField) { { oprot.WriteMapBegin(new TMap(TType.Set, TType.Map, _iter1.Count)); foreach (HashSet<int?> _iter2 in _iter1.Keys) { { oprot.WriteSetBegin(new TSet(TType.I32, _iter2.Count)); foreach (int? _iter3 in _iter2) { oprot.WriteI32(_iter3.Value); } oprot.WriteSetEnd(); } { oprot.WriteMapBegin(new TMap(TType.I32, TType.Set, _iter1[_iter2].Count)); foreach (int? _iter4 in _iter1[_iter2].Keys) { oprot.WriteI32(_iter4.Value); { oprot.WriteSetBegin(new TSet(TType.List, _iter1[_iter2][_iter4].Count)); foreach (List<Dictionary<Insanity, string>> _iter5 in _iter1[_iter2][_iter4]) { { oprot.WriteListBegin(new TList(TType.Map, _iter5.Count)); foreach (Dictionary<Insanity, string> _iter6 in _iter5) { { oprot.WriteMapBegin(new TMap(TType.Struct, TType.String, _iter6.Count)); foreach (Insanity _iter7 in _iter6.Keys) { _iter7.Write(oprot); oprot.WriteString(_iter6[_iter7]); } oprot.WriteMapEnd(); } } oprot.WriteListEnd(); } } oprot.WriteSetEnd(); } } oprot.WriteMapEnd(); } } oprot.WriteMapEnd(); } } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (BinaryField != null) { field.Name = "binary_field"; field.Type = TType.String; field.ID = 4; oprot.WriteFieldBegin(field); oprot.WriteBinary(BinaryField); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("ListTypeVersioningV2"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Strings != null) { field.Name = "strings"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.String, Strings.Count)); foreach (string _iter0 in Strings) { oprot.WriteString(_iter0); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (Hello != null) { field.Name = "hello"; field.Type = TType.String; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteString(Hello); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("ListTypeVersioningV1"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Myints != null) { field.Name = "myints"; field.Type = TType.List; field.ID = 1; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I32, Myints.Count)); foreach (int? _iter0 in Myints) { oprot.WriteI32(_iter0.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } if (Hello != null) { field.Name = "hello"; field.Type = TType.String; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteString(Hello); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("LargeDeltas"); oprot.WriteStructBegin(struc); TField field = new TField(); if (B1 != null) { field.Name = "b1"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); B1.Write(oprot); oprot.WriteFieldEnd(); } if (B10 != null) { field.Name = "b10"; field.Type = TType.Struct; field.ID = 10; oprot.WriteFieldBegin(field); B10.Write(oprot); oprot.WriteFieldEnd(); } if (B100 != null) { field.Name = "b100"; field.Type = TType.Struct; field.ID = 100; oprot.WriteFieldBegin(field); B100.Write(oprot); oprot.WriteFieldEnd(); } if (CheckTrue != null) { field.Name = "check_true"; field.Type = TType.Bool; field.ID = 500; oprot.WriteFieldBegin(field); oprot.WriteBool(CheckTrue.Value); oprot.WriteFieldEnd(); } if (B1000 != null) { field.Name = "b1000"; field.Type = TType.Struct; field.ID = 1000; oprot.WriteFieldBegin(field); B1000.Write(oprot); oprot.WriteFieldEnd(); } if (CheckFalse != null) { field.Name = "check_false"; field.Type = TType.Bool; field.ID = 1500; oprot.WriteFieldBegin(field); oprot.WriteBool(CheckFalse.Value); oprot.WriteFieldEnd(); } if (Vertwo2000 != null) { field.Name = "vertwo2000"; field.Type = TType.Struct; field.ID = 2000; oprot.WriteFieldBegin(field); Vertwo2000.Write(oprot); oprot.WriteFieldEnd(); } if (ASet2500 != null) { field.Name = "a_set2500"; field.Type = TType.Set; field.ID = 2500; oprot.WriteFieldBegin(field); { oprot.WriteSetBegin(new TSet(TType.String, ASet2500.Count)); foreach (string _iter0 in ASet2500) { oprot.WriteString(_iter0); } oprot.WriteSetEnd(); } oprot.WriteFieldEnd(); } if (Vertwo3000 != null) { field.Name = "vertwo3000"; field.Type = TType.Struct; field.ID = 3000; oprot.WriteFieldBegin(field); Vertwo3000.Write(oprot); oprot.WriteFieldEnd(); } if (BigNumbers != null) { field.Name = "big_numbers"; field.Type = TType.List; field.ID = 4000; oprot.WriteFieldBegin(field); { oprot.WriteListBegin(new TList(TType.I32, BigNumbers.Count)); foreach (int? _iter1 in BigNumbers) { oprot.WriteI32(_iter1.Value); } oprot.WriteListEnd(); } oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }