public void Write(TProtocol oprot) { TStruct struc = new TStruct("StructB"); oprot.WriteStructBegin(struc); if (Ab == null) throw new TProtocolException(TProtocolException.INVALID_DATA, "missing required property 'Ab'"); TField field = new TField(); if (Aa != null) { field.Name = "aa"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); Aa.Write(oprot); oprot.WriteFieldEnd(); } if (Ab != null) { field.Name = "ab"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); Ab.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Read(TProtocol iprot) { 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) { Field = new EmptyStruct(); Field.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("Xtruct2"); oprot.WriteStructBegin(struc); TField field = new TField(); if (ByteThing != null) { field.Name = "byte_thing"; field.Type = TType.Byte; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteByte(ByteThing.Value); oprot.WriteFieldEnd(); } if (StructThing != null) { field.Name = "struct_thing"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); StructThing.Write(oprot); oprot.WriteFieldEnd(); } if (I32Thing != null) { field.Name = "i32_thing"; field.Type = TType.I32; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteI32(I32Thing.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("MyStruct1"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MByte != null) { field.Name = "m_byte"; field.Type = TType.Byte; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteByte(MByte.Value); oprot.WriteFieldEnd(); } if (MInt != null) { field.Name = "m_int"; field.Type = TType.I32; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteI32(MInt.Value); oprot.WriteFieldEnd(); } if (MLong != null) { field.Name = "m_long"; field.Type = TType.I64; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteI64(MLong.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Bool) { B = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { S = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
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 Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { MInt = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I64) { MLong = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { 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) { S = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (S == null) throw new TProtocolException(TProtocolException.INVALID_DATA, "missing required property 'S'"); }
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("VersioningTestV1"); 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 (OldString != null) { field.Name = "old_string"; field.Type = TType.String; field.ID = 3; oprot.WriteFieldBegin(field); oprot.WriteString(OldString); 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("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 Read(TProtocol iprot) { 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) { { MIntMap = new Dictionary<int?, int?>(); TMap _map0 = iprot.ReadMapBegin(); for(int _i1 = 0; _i1 < _map0.Count; ++_i1) { int? _key2; int? _val3; _key2 = iprot.ReadI32(); _val3 = iprot.ReadI32(); MIntMap[_key2] = _val3; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Map) { { MObMap = new Dictionary<string, SimpleClass>(); TMap _map4 = iprot.ReadMapBegin(); for(int _i5 = 0; _i5 < _map4.Count; ++_i5) { string _key6; SimpleClass _val7; _key6 = iprot.ReadString(); _val7 = new SimpleClass(); _val7.Read(iprot); MObMap[_key6] = _val7; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Bonk = new List<List<List<Bonk>>>(); TList _list0 = iprot.ReadListBegin(); for(int _i1 = 0; _i1 < _list0.Count; ++_i1) { List<List<Bonk>> _elem2 = new List<List<Bonk>>(); { _elem2 = new List<List<Bonk>>(); TList _list3 = iprot.ReadListBegin(); for(int _i4 = 0; _i4 < _list3.Count; ++_i4) { List<Bonk> _elem5 = new List<Bonk>(); { _elem5 = new List<Bonk>(); TList _list6 = iprot.ReadListBegin(); for(int _i7 = 0; _i7 < _list6.Count; ++_i7) { Bonk _elem8 = new Bonk(); _elem8 = new Bonk(); _elem8.Read(iprot); _elem5.Add(_elem8); } iprot.ReadListEnd(); } _elem2.Add(_elem5); } iprot.ReadListEnd(); } Bonk.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { 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) { { UserMap = new Dictionary<Numberz?, long?>(); TMap _map0 = iprot.ReadMapBegin(); for(int _i1 = 0; _i1 < _map0.Count; ++_i1) { Numberz? _key2; long? _val3; _key2 = (Numberz?)iprot.ReadI32(); _val3 = iprot.ReadI64(); UserMap[_key2] = _val3; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Xtructs = new List<Xtruct>(); TList _list4 = iprot.ReadListBegin(); for(int _i5 = 0; _i5 < _list4.Count; ++_i5) { Xtruct _elem6 = new Xtruct(); _elem6 = new Xtruct(); _elem6.Read(iprot); Xtructs.Add(_elem6); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("ByteArrayMessage"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MByteArr != null) { field.Name = "m_byteArr"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteBinary(MByteArr); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("StringMessage"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MString != null) { field.Name = "m_string"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(MString); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("U8Message"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MVal != null) { field.Name = "m_val"; field.Type = TType.Byte; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteByte(MVal.Value); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("OneField"); oprot.WriteStructBegin(struc); TField field = new TField(); if (Field != null) { field.Name = "field"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); Field.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Read(TProtocol iprot) { 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) { StringThing = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Byte) { ByteThing = iprot.ReadByte(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.I32) { I32Thing = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.I64) { I64Thing = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Integerlist = new List<List<int?>>(); TList _list0 = iprot.ReadListBegin(); for(int _i1 = 0; _i1 < _list0.Count; ++_i1) { List<int?> _elem2 = new List<int?>(); { _elem2 = new List<int?>(); TList _list3 = iprot.ReadListBegin(); for(int _i4 = 0; _i4 < _list3.Count; ++_i4) { int? _elem5 = 0; _elem5 = iprot.ReadI32(); _elem2.Add(_elem5); } iprot.ReadListEnd(); } Integerlist.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("StructA"); oprot.WriteStructBegin(struc); if (S == null) throw new TProtocolException(TProtocolException.INVALID_DATA, "missing required property 'S'"); TField field = new TField(); if (S != null) { field.Name = "s"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(S); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Strings = new List<string>(); TList _list0 = iprot.ReadListBegin(); for(int _i1 = 0; _i1 < _list0.Count; ++_i1) { string _elem2 = null; _elem2 = iprot.ReadString(); Strings.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Hello = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { 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) { MS16msg = new S16Message(); MS16msg.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { MS32msg = new S32Message(); MS32msg.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { MSimpleClass = new SimpleClass(); MSimpleClass.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { BeginInBoth = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.String) { OldString = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.I32) { EndInBoth = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
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 Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 7: if (field.Type == TType.Map) { { MapField = new Dictionary<string, string>(); TMap _map0 = iprot.ReadMapBegin(); for(int _i1 = 0; _i1 < _map0.Count; ++_i1) { string _key2; string _val3; _key2 = iprot.ReadString(); _val3 = iprot.ReadString(); MapField[_key2] = _val3; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("BoolTest"); oprot.WriteStructBegin(struc); TField field = new TField(); if (B != null) { field.Name = "b"; field.Type = TType.Bool; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteBool(B.Value); oprot.WriteFieldEnd(); } if (S != null) { field.Name = "s"; field.Type = TType.String; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteString(S); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }
public void Write(TProtocol oprot) { TStruct struc = new TStruct("StructMessage"); oprot.WriteStructBegin(struc); TField field = new TField(); if (MStruct1 != null) { field.Name = "m_struct1"; field.Type = TType.Struct; field.ID = 1; oprot.WriteFieldBegin(field); MStruct1.Write(oprot); oprot.WriteFieldEnd(); } if (MStruct2 != null) { field.Name = "m_struct2"; field.Type = TType.Struct; field.ID = 2; oprot.WriteFieldBegin(field); MStruct2.Write(oprot); oprot.WriteFieldEnd(); } oprot.WriteFieldStop(); oprot.WriteStructEnd(); }