public void Read (TProtocol iprot) { bool isset_node = false; bool isset_port = false; 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) { Node = iprot.ReadString(); isset_node = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Set) { { Port = new THashSet<long>(); TSet _set181 = iprot.ReadSetBegin(); for( int _i182 = 0; _i182 < _set181.Count; ++_i182) { long _elem183; _elem183 = iprot.ReadI64(); Port.Add(_elem183); } iprot.ReadSetEnd(); } isset_port = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_node) throw new TProtocolException(TProtocolException.INVALID_DATA); if (!isset_port) throw new TProtocolException(TProtocolException.INVALID_DATA); }
public static void Skip(TProtocol prot, TType type) { prot.IncrementRecursionDepth(); try { switch (type) { case TType.Bool: prot.ReadBool(); break; case TType.Byte: prot.ReadByte(); break; case TType.I16: prot.ReadI16(); break; case TType.I32: prot.ReadI32(); break; case TType.I64: prot.ReadI64(); break; case TType.Double: prot.ReadDouble(); break; case TType.String: // Don't try to decode the string, just skip it. prot.ReadBinary(); break; case TType.Struct: prot.ReadStructBegin(); while (true) { TField field = prot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } Skip(prot, field.Type); prot.ReadFieldEnd(); } prot.ReadStructEnd(); break; case TType.Map: TMap map = prot.ReadMapBegin(); for (int i = 0; i < map.Count; i++) { Skip(prot, map.KeyType); Skip(prot, map.ValueType); } prot.ReadMapEnd(); break; case TType.Set: TSet set = prot.ReadSetBegin(); for (int i = 0; i < set.Count; i++) { Skip(prot, set.ElementType); } prot.ReadSetEnd(); break; case TType.List: TList list = prot.ReadListBegin(); for (int i = 0; i < list.Count; i++) { Skip(prot, list.ElementType); } prot.ReadListEnd(); break; } } finally { prot.DecrementRecursionDepth(); } }
public static void Skip(TProtocol prot, TType type) { switch (type) { case TType.Bool: prot.ReadBool(); break; case TType.Byte: prot.ReadByte(); break; case TType.I16: prot.ReadI16(); break; case TType.I32: prot.ReadI32(); break; case TType.I64: prot.ReadI64(); break; case TType.Double: prot.ReadDouble(); break; case TType.String: // Don't try to decode the string, just skip it. prot.ReadBinary(); break; case TType.Struct: prot.ReadStructBegin(); while (true) { TField field = prot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } Skip(prot, field.Type); prot.ReadFieldEnd(); } prot.ReadStructEnd(); break; case TType.Map: TMap map = prot.ReadMapBegin(); for (int i = 0; i < map.Count; i++) { Skip(prot, map.KeyType); Skip(prot, map.ValueType); } prot.ReadMapEnd(); break; case TType.Set: TSet set = prot.ReadSetBegin(); for (int i = 0; i < set.Count; i++) { Skip(prot, set.ElementType); } prot.ReadSetEnd(); break; case TType.List: TList list = prot.ReadListBegin(); for (int i = 0; i < list.Count; i++) { Skip(prot, list.ElementType); } prot.ReadListEnd(); break; } }
public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.Set) { { Success = new THashSet<Contact>(); TSet _set310 = iprot.ReadSetBegin(); for( int _i311 = 0; _i311 < _set310.Count; ++_i311) { Contact _elem312 = new Contact(); _elem312 = new Contact(); _elem312.Read(iprot); Success.Add(_elem312); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { E = new TalkException(); E.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) { case 0: if (field.Type == TType.Set) { { Success = new THashSet<string>(); TSet _set222 = iprot.ReadSetBegin(); for( int _i223 = 0; _i223 < _set222.Count; ++_i223) { string _elem224 = null; _elem224 = iprot.ReadString(); Success.Add(_elem224); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { E = new TalkException(); E.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) { case 2: if (field.Type == TType.Set) { { Phones = new THashSet<string>(); TSet _set213 = iprot.ReadSetBegin(); for( int _i214 = 0; _i214 < _set213.Count; ++_i214) { string _elem215 = null; _elem215 = iprot.ReadString(); Phones.Add(_elem215); } iprot.ReadSetEnd(); } } 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.I32) { ReqSeq = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Set) { { Phones = new THashSet<string>(); TSet _set190 = iprot.ReadSetBegin(); for( int _i191 = 0; _i191 < _set190.Count; ++_i191) { string _elem192 = null; _elem192 = iprot.ReadString(); Phones.Add(_elem192); } iprot.ReadSetEnd(); } } 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 0: if (field.Type == TType.Set) { { Success = new THashSet<Dictionary<string, string>>(); TSet _set79 = iprot.ReadSetBegin(); for( int _i80 = 0; _i80 < _set79.Count; ++_i80) { Dictionary<string, string> _elem81 = new Dictionary<string, string>(); { _elem81 = new Dictionary<string, string>(); TMap _map82 = iprot.ReadMapBegin(); for( int _i83 = 0; _i83 < _map82.Count; ++_i83) { string _key84; string _val85; _key84 = iprot.ReadString(); _val85 = iprot.ReadString(); _elem81[_key84] = _val85; } iprot.ReadMapEnd(); } Success.Add(_elem81); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public override void ReadSetEnd() { WrappedProtocol.ReadSetEnd(); }
public void Read (TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_msgType = false; 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) { MsgType = (VariableType)iprot.ReadI32(); isset_msgType = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Bool) { BoolVal = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Byte) { ByteVal = iprot.ReadByte(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { IntVal = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Double) { DoubleVal = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { StrVal = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { ByteArrVal = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Map) { { MapVal = new Dictionary<BaseMsg, BaseMsg>(); TMap _map0 = iprot.ReadMapBegin(); for( int _i1 = 0; _i1 < _map0.Count; ++_i1) { BaseMsg _key2; BaseMsg _val3; _key2 = new BaseMsg(); _key2.Read(iprot); _val3 = new BaseMsg(); _val3.Read(iprot); MapVal[_key2] = _val3; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.List) { { ListVal = new List<BaseMsg>(); TList _list4 = iprot.ReadListBegin(); for( int _i5 = 0; _i5 < _list4.Count; ++_i5) { BaseMsg _elem6; _elem6 = new BaseMsg(); _elem6.Read(iprot); ListVal.Add(_elem6); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Set) { { SetVal = new THashSet<BaseMsg>(); TSet _set7 = iprot.ReadSetBegin(); for( int _i8 = 0; _i8 < _set7.Count; ++_i8) { BaseMsg _elem9; _elem9 = new BaseMsg(); _elem9.Read(iprot); SetVal.Add(_elem9); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_msgType) throw new TProtocolException(TProtocolException.INVALID_DATA); } finally { iprot.DecrementRecursionDepth(); } }
public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.Set) { { Success = new THashSet<Dictionary<string, string>>(); TSet _set104 = iprot.ReadSetBegin(); for( int _i105 = 0; _i105 < _set104.Count; ++_i105) { Dictionary<string, string> _elem106 = new Dictionary<string, string>(); { _elem106 = new Dictionary<string, string>(); TMap _map107 = iprot.ReadMapBegin(); for( int _i108 = 0; _i108 < _map107.Count; ++_i108) { string _key109; string _val110; _key109 = iprot.ReadString(); _val110 = iprot.ReadString(); _elem106[_key109] = _val110; } iprot.ReadMapEnd(); } Success.Add(_elem106); } iprot.ReadSetEnd(); } } 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) { AccessKey = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Set) { { EntityIds = new THashSet<string>(); TSet _set95 = iprot.ReadSetBegin(); for( int _i96 = 0; _i96 < _set95.Count; ++_i96) { string _elem97 = null; _elem97 = iprot.ReadString(); EntityIds.Add(_elem97); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I64) { StartTime = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I64) { EndTime = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public static void Skip(TProtocol prot, TType type) { switch (type) { case TType.Bool: { prot.ReadBool(); return; } case TType.Byte: { prot.ReadByte(); return; } case TType.Double: { prot.ReadDouble(); return; } case TType.Void | TType.Double: case TType.Void | TType.Bool | TType.Byte | TType.Double | TType.I16: case TType.Void | TType.I32: { return; } case TType.I16: { prot.ReadI16(); return; } case TType.I32: { prot.ReadI32(); return; } case TType.I64: { prot.ReadI64(); return; } case TType.String: { prot.ReadBinary(); return; } case TType.Struct: { prot.ReadStructBegin(); while (true) { TField tField = prot.ReadFieldBegin(); if (tField.Type == TType.Stop) { break; } TProtocolUtil.Skip(prot, tField.Type); prot.ReadFieldEnd(); } prot.ReadStructEnd(); return; } case TType.Map: { TMap tMap = prot.ReadMapBegin(); for (int i = 0; i < tMap.Count; i++) { TProtocolUtil.Skip(prot, tMap.KeyType); TProtocolUtil.Skip(prot, tMap.ValueType); } prot.ReadMapEnd(); return; } case TType.Set: { TSet tSet = prot.ReadSetBegin(); for (int j = 0; j < tSet.Count; j++) { TProtocolUtil.Skip(prot, tSet.ElementType); } prot.ReadSetEnd(); return; } case TType.List: { TList tList = prot.ReadListBegin(); for (int k = 0; k < tList.Count; k++) { TProtocolUtil.Skip(prot, tList.ElementType); } prot.ReadListEnd(); return; } default: { return; } } }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.Set) { { this.success = new THashSet<string>(); TSet _set82 = iprot.ReadSetBegin(); for( int _i83 = 0; _i83 < _set82.Count; ++_i83) { string _elem84 = null; _elem84 = iprot.ReadString(); this.success.Add(_elem84); } iprot.ReadSetEnd(); } this.__isset.success = true; } 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.Set) { { KeysOnly = new THashSet<string>(); TSet _set8 = iprot.ReadSetBegin(); for( int _i9 = 0; _i9 < _set8.Count; ++_i9) { string _elem10 = null; _elem10 = iprot.ReadString(); KeysOnly.Add(_elem10); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Map) { { FullMap = new Dictionary<string, string>(); TMap _map11 = iprot.ReadMapBegin(); for( int _i12 = 0; _i12 < _map11.Count; ++_i12) { string _key13; string _val14; _key13 = iprot.ReadString(); _val14 = iprot.ReadString(); FullMap[_key13] = _val14; } 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 2: if (field.Type == TType.String) { SessionId = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Set) { { Ids = new THashSet<string>(); TSet _set105 = iprot.ReadSetBegin(); for( int _i106 = 0; _i106 < _set105.Count; ++_i106) { string _elem107 = null; _elem107 = iprot.ReadString(); Ids.Add(_elem107); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public static void Skip(TProtocol prot, TType type) { prot.IncrementRecursionDepth(); try { switch (type) { case TType.Bool: prot.ReadBool(); break; case TType.Byte: prot.ReadByte(); break; case TType.I16: prot.ReadI16(); break; case TType.I32: prot.ReadI32(); break; case TType.I64: prot.ReadI64(); break; case TType.Double: prot.ReadDouble(); break; case TType.String: // Don't try to decode the string, just skip it. prot.ReadBinary(); break; case TType.Struct: prot.ReadStructBegin(); while (true) { TField field = prot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } Skip(prot, field.Type); prot.ReadFieldEnd(); } prot.ReadStructEnd(); break; case TType.Map: TMap map = prot.ReadMapBegin(); for (int i = 0; i < map.Count; i++) { Skip(prot, map.KeyType); Skip(prot, map.ValueType); } prot.ReadMapEnd(); break; case TType.Set: TSet set = prot.ReadSetBegin(); for (int i = 0; i < set.Count; i++) { Skip(prot, set.ElementType); } prot.ReadSetEnd(); break; case TType.List: TList list = prot.ReadListBegin(); for (int i = 0; i < list.Count; i++) { Skip(prot, list.ElementType); } prot.ReadListEnd(); break; default: throw new TProtocolException(TProtocolException.INVALID_DATA, "Unknown data type " + type.ToString("d")); } } finally { prot.DecrementRecursionDepth(); } }