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 ComplexMessage( S16Message mS16msg, S32Message mS32msg, SimpleClass mSimpleClass ) { this.MS16msg = mS16msg; this.MS32msg = mS32msg; this.MSimpleClass = mSimpleClass; }
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(); }