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 1: if (field.Type == TType.Bool) { ImTrue = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Bool) { ImFalse = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Byte) { ABite = iprot.ReadByte(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I16) { Integer16 = iprot.ReadI16(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I32) { Integer32 = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.I64) { Integer64 = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Double) { DoublePrecision = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { SomeCharacters = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.String) { ZomgUnicode = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Bool) { WhatWho = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.String) { Base64 = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.List) { { ByteList = new List<sbyte?>(); TList _list0 = iprot.ReadListBegin(); for(int _i1 = 0; _i1 < _list0.Count; ++_i1) { sbyte? _elem2 = 0; _elem2 = iprot.ReadByte(); ByteList.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.List) { { I16List = new List<short?>(); TList _list3 = iprot.ReadListBegin(); for(int _i4 = 0; _i4 < _list3.Count; ++_i4) { short? _elem5 = 0; _elem5 = iprot.ReadI16(); I16List.Add(_elem5); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.List) { { I64List = new List<long?>(); TList _list6 = iprot.ReadListBegin(); for(int _i7 = 0; _i7 < _list6.Count; ++_i7) { long? _elem8 = 0; _elem8 = iprot.ReadI64(); I64List.Add(_elem8); } 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.Byte) { AByte = iprot.ReadByte(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I16) { AI16 = iprot.ReadI16(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I32) { AI32 = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I64) { AI64 = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.Double) { ADouble = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { AString = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { ABinary = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Bool) { TrueField = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Bool) { FalseField = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { EmptyStructField = new Empty(); EmptyStructField.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.List) { { ByteList = new List<sbyte?>(); TList _list0 = iprot.ReadListBegin(); for(int _i1 = 0; _i1 < _list0.Count; ++_i1) { sbyte? _elem2 = 0; _elem2 = iprot.ReadByte(); ByteList.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 12: if (field.Type == TType.List) { { I16List = new List<short?>(); TList _list3 = iprot.ReadListBegin(); for(int _i4 = 0; _i4 < _list3.Count; ++_i4) { short? _elem5 = 0; _elem5 = iprot.ReadI16(); I16List.Add(_elem5); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 13: if (field.Type == TType.List) { { I32List = new List<int?>(); TList _list6 = iprot.ReadListBegin(); for(int _i7 = 0; _i7 < _list6.Count; ++_i7) { int? _elem8 = 0; _elem8 = iprot.ReadI32(); I32List.Add(_elem8); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 14: if (field.Type == TType.List) { { I64List = new List<long?>(); TList _list9 = iprot.ReadListBegin(); for(int _i10 = 0; _i10 < _list9.Count; ++_i10) { long? _elem11 = 0; _elem11 = iprot.ReadI64(); I64List.Add(_elem11); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 15: if (field.Type == TType.List) { { DoubleList = new List<double?>(); TList _list12 = iprot.ReadListBegin(); for(int _i13 = 0; _i13 < _list12.Count; ++_i13) { double? _elem14 = (double)0; _elem14 = iprot.ReadDouble(); DoubleList.Add(_elem14); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 16: if (field.Type == TType.List) { { StringList = new List<string>(); TList _list15 = iprot.ReadListBegin(); for(int _i16 = 0; _i16 < _list15.Count; ++_i16) { string _elem17 = null; _elem17 = iprot.ReadString(); StringList.Add(_elem17); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 17: if (field.Type == TType.List) { { BinaryList = new List<byte[]>(); TList _list18 = iprot.ReadListBegin(); for(int _i19 = 0; _i19 < _list18.Count; ++_i19) { byte[] _elem20; _elem20 = iprot.ReadBinary(); BinaryList.Add(_elem20); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 18: if (field.Type == TType.List) { { BooleanList = new List<bool?>(); TList _list21 = iprot.ReadListBegin(); for(int _i22 = 0; _i22 < _list21.Count; ++_i22) { bool? _elem23 = false; _elem23 = iprot.ReadBool(); BooleanList.Add(_elem23); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 19: if (field.Type == TType.List) { { StructList = new List<Empty>(); TList _list24 = iprot.ReadListBegin(); for(int _i25 = 0; _i25 < _list24.Count; ++_i25) { Empty _elem26 = new Empty(); _elem26 = new Empty(); _elem26.Read(iprot); StructList.Add(_elem26); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.Set) { { ByteSet = new HashSet<sbyte?>(); TSet _set27 = iprot.ReadSetBegin(); for(int _i28 = 0; _i28 < _set27.Count; ++_i28) { sbyte? _elem29 = 0; _elem29 = iprot.ReadByte(); ByteSet.Add(_elem29); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 21: if (field.Type == TType.Set) { { I16Set = new HashSet<short?>(); TSet _set30 = iprot.ReadSetBegin(); for(int _i31 = 0; _i31 < _set30.Count; ++_i31) { short? _elem32 = 0; _elem32 = iprot.ReadI16(); I16Set.Add(_elem32); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 22: if (field.Type == TType.Set) { { I32Set = new HashSet<int?>(); TSet _set33 = iprot.ReadSetBegin(); for(int _i34 = 0; _i34 < _set33.Count; ++_i34) { int? _elem35 = 0; _elem35 = iprot.ReadI32(); I32Set.Add(_elem35); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 23: if (field.Type == TType.Set) { { I64Set = new HashSet<long?>(); TSet _set36 = iprot.ReadSetBegin(); for(int _i37 = 0; _i37 < _set36.Count; ++_i37) { long? _elem38 = 0; _elem38 = iprot.ReadI64(); I64Set.Add(_elem38); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 24: if (field.Type == TType.Set) { { DoubleSet = new HashSet<double?>(); TSet _set39 = iprot.ReadSetBegin(); for(int _i40 = 0; _i40 < _set39.Count; ++_i40) { double? _elem41 = (double)0; _elem41 = iprot.ReadDouble(); DoubleSet.Add(_elem41); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 25: if (field.Type == TType.Set) { { StringSet = new HashSet<string>(); TSet _set42 = iprot.ReadSetBegin(); for(int _i43 = 0; _i43 < _set42.Count; ++_i43) { string _elem44 = null; _elem44 = iprot.ReadString(); StringSet.Add(_elem44); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 26: if (field.Type == TType.Set) { { BinarySet = new HashSet<byte[]>(); TSet _set45 = iprot.ReadSetBegin(); for(int _i46 = 0; _i46 < _set45.Count; ++_i46) { byte[] _elem47; _elem47 = iprot.ReadBinary(); BinarySet.Add(_elem47); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 27: if (field.Type == TType.Set) { { BooleanSet = new HashSet<bool?>(); TSet _set48 = iprot.ReadSetBegin(); for(int _i49 = 0; _i49 < _set48.Count; ++_i49) { bool? _elem50 = false; _elem50 = iprot.ReadBool(); BooleanSet.Add(_elem50); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 28: if (field.Type == TType.Set) { { StructSet = new HashSet<Empty>(); TSet _set51 = iprot.ReadSetBegin(); for(int _i52 = 0; _i52 < _set51.Count; ++_i52) { Empty _elem53 = new Empty(); _elem53 = new Empty(); _elem53.Read(iprot); StructSet.Add(_elem53); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 29: if (field.Type == TType.Map) { { ByteByteMap = new Dictionary<sbyte?, sbyte?>(); TMap _map54 = iprot.ReadMapBegin(); for(int _i55 = 0; _i55 < _map54.Count; ++_i55) { sbyte? _key56; sbyte? _val57; _key56 = iprot.ReadByte(); _val57 = iprot.ReadByte(); ByteByteMap[_key56] = _val57; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.Map) { { I16ByteMap = new Dictionary<short?, sbyte?>(); TMap _map58 = iprot.ReadMapBegin(); for(int _i59 = 0; _i59 < _map58.Count; ++_i59) { short? _key60; sbyte? _val61; _key60 = iprot.ReadI16(); _val61 = iprot.ReadByte(); I16ByteMap[_key60] = _val61; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 31: if (field.Type == TType.Map) { { I32ByteMap = new Dictionary<int?, sbyte?>(); TMap _map62 = iprot.ReadMapBegin(); for(int _i63 = 0; _i63 < _map62.Count; ++_i63) { int? _key64; sbyte? _val65; _key64 = iprot.ReadI32(); _val65 = iprot.ReadByte(); I32ByteMap[_key64] = _val65; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 32: if (field.Type == TType.Map) { { I64ByteMap = new Dictionary<long?, sbyte?>(); TMap _map66 = iprot.ReadMapBegin(); for(int _i67 = 0; _i67 < _map66.Count; ++_i67) { long? _key68; sbyte? _val69; _key68 = iprot.ReadI64(); _val69 = iprot.ReadByte(); I64ByteMap[_key68] = _val69; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 33: if (field.Type == TType.Map) { { DoubleByteMap = new Dictionary<double?, sbyte?>(); TMap _map70 = iprot.ReadMapBegin(); for(int _i71 = 0; _i71 < _map70.Count; ++_i71) { double? _key72; sbyte? _val73; _key72 = iprot.ReadDouble(); _val73 = iprot.ReadByte(); DoubleByteMap[_key72] = _val73; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 34: if (field.Type == TType.Map) { { StringByteMap = new Dictionary<string, sbyte?>(); TMap _map74 = iprot.ReadMapBegin(); for(int _i75 = 0; _i75 < _map74.Count; ++_i75) { string _key76; sbyte? _val77; _key76 = iprot.ReadString(); _val77 = iprot.ReadByte(); StringByteMap[_key76] = _val77; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 35: if (field.Type == TType.Map) { { BinaryByteMap = new Dictionary<byte[], sbyte?>(); TMap _map78 = iprot.ReadMapBegin(); for(int _i79 = 0; _i79 < _map78.Count; ++_i79) { byte[] _key80; sbyte? _val81; _key80 = iprot.ReadBinary(); _val81 = iprot.ReadByte(); BinaryByteMap[_key80] = _val81; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 36: if (field.Type == TType.Map) { { BooleanByteMap = new Dictionary<bool?, sbyte?>(); TMap _map82 = iprot.ReadMapBegin(); for(int _i83 = 0; _i83 < _map82.Count; ++_i83) { bool? _key84; sbyte? _val85; _key84 = iprot.ReadBool(); _val85 = iprot.ReadByte(); BooleanByteMap[_key84] = _val85; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 37: if (field.Type == TType.Map) { { ByteI16Map = new Dictionary<sbyte?, short?>(); TMap _map86 = iprot.ReadMapBegin(); for(int _i87 = 0; _i87 < _map86.Count; ++_i87) { sbyte? _key88; short? _val89; _key88 = iprot.ReadByte(); _val89 = iprot.ReadI16(); ByteI16Map[_key88] = _val89; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 38: if (field.Type == TType.Map) { { ByteI32Map = new Dictionary<sbyte?, int?>(); TMap _map90 = iprot.ReadMapBegin(); for(int _i91 = 0; _i91 < _map90.Count; ++_i91) { sbyte? _key92; int? _val93; _key92 = iprot.ReadByte(); _val93 = iprot.ReadI32(); ByteI32Map[_key92] = _val93; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 39: if (field.Type == TType.Map) { { ByteI64Map = new Dictionary<sbyte?, long?>(); TMap _map94 = iprot.ReadMapBegin(); for(int _i95 = 0; _i95 < _map94.Count; ++_i95) { sbyte? _key96; long? _val97; _key96 = iprot.ReadByte(); _val97 = iprot.ReadI64(); ByteI64Map[_key96] = _val97; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 40: if (field.Type == TType.Map) { { ByteDoubleMap = new Dictionary<sbyte?, double?>(); TMap _map98 = iprot.ReadMapBegin(); for(int _i99 = 0; _i99 < _map98.Count; ++_i99) { sbyte? _key100; double? _val101; _key100 = iprot.ReadByte(); _val101 = iprot.ReadDouble(); ByteDoubleMap[_key100] = _val101; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 41: if (field.Type == TType.Map) { { ByteStringMap = new Dictionary<sbyte?, string>(); TMap _map102 = iprot.ReadMapBegin(); for(int _i103 = 0; _i103 < _map102.Count; ++_i103) { sbyte? _key104; string _val105; _key104 = iprot.ReadByte(); _val105 = iprot.ReadString(); ByteStringMap[_key104] = _val105; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 42: if (field.Type == TType.Map) { { ByteBinaryMap = new Dictionary<sbyte?, byte[]>(); TMap _map106 = iprot.ReadMapBegin(); for(int _i107 = 0; _i107 < _map106.Count; ++_i107) { sbyte? _key108; byte[] _val109; _key108 = iprot.ReadByte(); _val109 = iprot.ReadBinary(); ByteBinaryMap[_key108] = _val109; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 43: if (field.Type == TType.Map) { { ByteBooleanMap = new Dictionary<sbyte?, bool?>(); TMap _map110 = iprot.ReadMapBegin(); for(int _i111 = 0; _i111 < _map110.Count; ++_i111) { sbyte? _key112; bool? _val113; _key112 = iprot.ReadByte(); _val113 = iprot.ReadBool(); ByteBooleanMap[_key112] = _val113; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 44: if (field.Type == TType.Map) { { ListByteMap = new Dictionary<List<sbyte?>, sbyte?>(); TMap _map114 = iprot.ReadMapBegin(); for(int _i115 = 0; _i115 < _map114.Count; ++_i115) { List<sbyte?> _key116; sbyte? _val117; { _key116 = new List<sbyte?>(); TList _list118 = iprot.ReadListBegin(); for(int _i119 = 0; _i119 < _list118.Count; ++_i119) { sbyte? _elem120 = 0; _elem120 = iprot.ReadByte(); _key116.Add(_elem120); } iprot.ReadListEnd(); } _val117 = iprot.ReadByte(); ListByteMap[_key116] = _val117; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 45: if (field.Type == TType.Map) { { SetByteMap = new Dictionary<HashSet<sbyte?>, sbyte?>(); TMap _map121 = iprot.ReadMapBegin(); for(int _i122 = 0; _i122 < _map121.Count; ++_i122) { HashSet<sbyte?> _key123; sbyte? _val124; { _key123 = new HashSet<sbyte?>(); TSet _set125 = iprot.ReadSetBegin(); for(int _i126 = 0; _i126 < _set125.Count; ++_i126) { sbyte? _elem127 = 0; _elem127 = iprot.ReadByte(); _key123.Add(_elem127); } iprot.ReadSetEnd(); } _val124 = iprot.ReadByte(); SetByteMap[_key123] = _val124; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 46: if (field.Type == TType.Map) { { MapByteMap = new Dictionary<Dictionary<sbyte?, sbyte?>, sbyte?>(); TMap _map128 = iprot.ReadMapBegin(); for(int _i129 = 0; _i129 < _map128.Count; ++_i129) { Dictionary<sbyte?, sbyte?> _key130; sbyte? _val131; { _key130 = new Dictionary<sbyte?, sbyte?>(); TMap _map132 = iprot.ReadMapBegin(); for(int _i133 = 0; _i133 < _map132.Count; ++_i133) { sbyte? _key134; sbyte? _val135; _key134 = iprot.ReadByte(); _val135 = iprot.ReadByte(); _key130[_key134] = _val135; } iprot.ReadMapEnd(); } _val131 = iprot.ReadByte(); MapByteMap[_key130] = _val131; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 47: if (field.Type == TType.Map) { { ByteMapMap = new Dictionary<sbyte?, Dictionary<sbyte?, sbyte?>>(); TMap _map136 = iprot.ReadMapBegin(); for(int _i137 = 0; _i137 < _map136.Count; ++_i137) { sbyte? _key138; Dictionary<sbyte?, sbyte?> _val139; _key138 = iprot.ReadByte(); { _val139 = new Dictionary<sbyte?, sbyte?>(); TMap _map140 = iprot.ReadMapBegin(); for(int _i141 = 0; _i141 < _map140.Count; ++_i141) { sbyte? _key142; sbyte? _val143; _key142 = iprot.ReadByte(); _val143 = iprot.ReadByte(); _val139[_key142] = _val143; } iprot.ReadMapEnd(); } ByteMapMap[_key138] = _val139; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 48: if (field.Type == TType.Map) { { ByteSetMap = new Dictionary<sbyte?, HashSet<sbyte?>>(); TMap _map144 = iprot.ReadMapBegin(); for(int _i145 = 0; _i145 < _map144.Count; ++_i145) { sbyte? _key146; HashSet<sbyte?> _val147; _key146 = iprot.ReadByte(); { _val147 = new HashSet<sbyte?>(); TSet _set148 = iprot.ReadSetBegin(); for(int _i149 = 0; _i149 < _set148.Count; ++_i149) { sbyte? _elem150 = 0; _elem150 = iprot.ReadByte(); _val147.Add(_elem150); } iprot.ReadSetEnd(); } ByteSetMap[_key146] = _val147; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 49: if (field.Type == TType.Map) { { ByteListMap = new Dictionary<sbyte?, List<sbyte?>>(); TMap _map151 = iprot.ReadMapBegin(); for(int _i152 = 0; _i152 < _map151.Count; ++_i152) { sbyte? _key153; List<sbyte?> _val154; _key153 = iprot.ReadByte(); { _val154 = new List<sbyte?>(); TList _list155 = iprot.ReadListBegin(); for(int _i156 = 0; _i156 < _list155.Count; ++_i156) { sbyte? _elem157 = 0; _elem157 = iprot.ReadByte(); _val154.Add(_elem157); } iprot.ReadListEnd(); } ByteListMap[_key153] = _val154; } 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.I32) { BeginInBoth = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { Newint = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Byte) { Newbyte = iprot.ReadByte(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I16) { Newshort = iprot.ReadI16(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I64) { Newlong = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Double) { Newdouble = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Struct) { Newstruct = new Bonk(); Newstruct.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.List) { { Newlist = new List<int?>(); TList _list0 = iprot.ReadListBegin(); for(int _i1 = 0; _i1 < _list0.Count; ++_i1) { int? _elem2 = 0; _elem2 = iprot.ReadI32(); Newlist.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Set) { { Newset = new HashSet<int?>(); TSet _set3 = iprot.ReadSetBegin(); for(int _i4 = 0; _i4 < _set3.Count; ++_i4) { int? _elem5 = 0; _elem5 = iprot.ReadI32(); Newset.Add(_elem5); } iprot.ReadSetEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Map) { { Newmap = new Dictionary<int?, int?>(); TMap _map6 = iprot.ReadMapBegin(); for(int _i7 = 0; _i7 < _map6.Count; ++_i7) { int? _key8; int? _val9; _key8 = iprot.ReadI32(); _val9 = iprot.ReadI32(); Newmap[_key8] = _val9; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.String) { Newstring = 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 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) { MBool = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Byte) { MByte = iprot.ReadByte(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I16) { MShort = iprot.ReadI16(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { MInt = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I64) { MLong = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Double) { MDouble = iprot.ReadDouble(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.I32) { MEnum = (MyEnum?)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }