public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { 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) { Status = new APIResponse(); Status.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Methods = new List <SmartContractMethod>(); TList _list70 = iprot.ReadListBegin(); for (int _i71 = 0; _i71 < _list70.Count; ++_i71) { SmartContractMethod _elem72; _elem72 = new SmartContractMethod(); _elem72.Read(iprot); Methods.Add(_elem72); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { Variables = new Dictionary <string, Variant>(); TMap _map73 = iprot.ReadMapBegin(); for (int _i74 = 0; _i74 < _map73.Count; ++_i74) { string _key75; Variant _val76; _key75 = iprot.ReadString(); _val76 = new Variant(); _val76.Read(iprot); Variables[_key75] = _val76; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { 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) { Status = new APIResponse(); Status.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { Method = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { Params = new List <Variant>(); TList _list58 = iprot.ReadListBegin(); for (int _i59 = 0; _i59 < _list58.Count; ++_i59) { Variant _elem60; _elem60 = new Variant(); _elem60.Read(iprot); Params.Add(_elem60); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }