public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list24 = await iprot.ReadListBeginAsync(cancellationToken); Batches = new List <Batch>(_list24.Count); for (int _i25 = 0; _i25 < _list24.Count; ++_i25) { Batch _elem26; _elem26 = new Batch(); await _elem26.ReadAsync(iprot, cancellationToken); Batches.Add(_elem26); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list499 = await iprot.ReadListBeginAsync(cancellationToken); Announcements = new List <SquareChatAnnouncement>(_list499.Count); for (int _i500 = 0; _i500 < _list499.Count; ++_i500) { SquareChatAnnouncement _elem501; _elem501 = new SquareChatAnnouncement(); await _elem501.ReadAsync(iprot, cancellationToken); Announcements.Add(_elem501); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Spans = new List <Jaeger.Thrift.Agent.Zipkin.Span>(); TList _list0 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { Jaeger.Thrift.Agent.Zipkin.Span _elem2; _elem2 = new Jaeger.Thrift.Agent.Zipkin.Span(); await _elem2.ReadAsync(iprot, cancellationToken); Spans.Add(_elem2); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { SpotItems = new List <SpotItem>(); TList _list12 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i13 = 0; _i13 < _list12.Count; ++_i13) { SpotItem _elem14; _elem14 = new SpotItem(); await _elem14.ReadAsync(iprot, cancellationToken); SpotItems.Add(_elem14); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.List) { { TList _list47 = await iprot.ReadListBeginAsync(cancellationToken); Success = new List <global::Jaeger.Thrift.BatchSubmitResponse>(_list47.Count); for (int _i48 = 0; _i48 < _list47.Count; ++_i48) { global::Jaeger.Thrift.BatchSubmitResponse _elem49; _elem49 = new global::Jaeger.Thrift.BatchSubmitResponse(); await _elem49.ReadAsync(iprot, cancellationToken); Success.Add(_elem49); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list378 = await iprot.ReadListBeginAsync(cancellationToken); CategoryList = new List <Category>(_list378.Count); for (int _i379 = 0; _i379 < _list378.Count; ++_i379) { Category _elem380; _elem380 = new Category(); await _elem380.ReadAsync(iprot, cancellationToken); CategoryList.Add(_elem380); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.List) { { TList _list0 = await iprot.ReadListBeginAsync(cancellationToken); Success = new List <BaggageRestriction>(_list0.Count); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { BaggageRestriction _elem2; _elem2 = new BaggageRestriction(); await _elem2.ReadAsync(iprot, cancellationToken); Success.Add(_elem2); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list174 = await iprot.ReadListBeginAsync(cancellationToken); Bonk = new List <global::ThriftTest.Bonk>(_list174.Count); for (int _i175 = 0; _i175 < _list174.Count; ++_i175) { global::ThriftTest.Bonk _elem176; _elem176 = new global::ThriftTest.Bonk(); await _elem176.ReadAsync(iprot, cancellationToken); Bonk.Add(_elem176); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.List) { { Success = new List <BatchSubmitResponse>(); TList _list28 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i29 = 0; _i29 < _list28.Count; ++_i29) { BatchSubmitResponse _elem30; _elem30 = new BatchSubmitResponse(); await _elem30.ReadAsync(iprot, cancellationToken); Success.Add(_elem30); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.List) { { TList _list13 = await iprot.ReadListBeginAsync(cancellationToken); Success = new List <global::PElementServer.Thrift.PElement>(_list13.Count); for (int _i14 = 0; _i14 < _list13.Count; ++_i14) { global::PElementServer.Thrift.PElement _elem15; _elem15 = new global::PElementServer.Thrift.PElement(); await _elem15.ReadAsync(iprot, cancellationToken); Success.Add(_elem15); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list1 = await iprot.ReadListBeginAsync(cancellationToken); Spans = new List <global::Jaeger.Thrift.Agent.Zipkin.Span>(_list1.Count); for (int _i2 = 0; _i2 < _list1.Count; ++_i2) { global::Jaeger.Thrift.Agent.Zipkin.Span _elem3; _elem3 = new global::Jaeger.Thrift.Agent.Zipkin.Span(); await _elem3.ReadAsync(iprot, cancellationToken); Spans.Add(_elem3); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 2: if (field.Type == TType.List) { { TList _list458 = await iprot.ReadListBeginAsync(cancellationToken); Unsubscriptions = new List <long>(_list458.Count); for (int _i459 = 0; _i459 < _list458.Count; ++_i459) { long _elem460; _elem460 = await iprot.ReadI64Async(cancellationToken); Unsubscriptions.Add(_elem460); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Labels = new List <string>(); TList _list4 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i5 = 0; _i5 < _list4.Count; ++_i5) { string _elem6; _elem6 = await iprot.ReadStringAsync(cancellationToken); Labels.Add(_elem6); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol protocol, CancellationToken cancellationToken) { bool isset_types = false; TField field; await protocol.ReadStructBeginAsync(cancellationToken); while (true) { field = await protocol.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Types = new List <TypeEntry>(); TList _list15 = await protocol.ReadListBeginAsync(cancellationToken); for (int _i16 = 0; _i16 < _list15.Count; ++_i16) { TypeEntry _elem17 = new TypeEntry(); _elem17 = new TypeEntry(); await _elem17.ReadAsync(protocol, cancellationToken); Types.Add(_elem17); } await protocol.ReadListEndAsync(cancellationToken); } isset_types = true; } else { await TProtocolUtil.SkipAsync(protocol, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(protocol, field.Type, cancellationToken); break; } await protocol.ReadFieldEndAsync(cancellationToken); } await protocol.ReadStructEndAsync(cancellationToken); if (!isset_types) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }
public async Task ReadAsync(TProtocol protocol, CancellationToken cancellationToken) { bool isset_colVals = false; TField field; await protocol.ReadStructBeginAsync(cancellationToken); while (true) { field = await protocol.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { ColVals = new List <ColumnValue>(); TList _list23 = await protocol.ReadListBeginAsync(cancellationToken); for (int _i24 = 0; _i24 < _list23.Count; ++_i24) { ColumnValue _elem25 = new ColumnValue(); _elem25 = new ColumnValue(); await _elem25.ReadAsync(protocol, cancellationToken); ColVals.Add(_elem25); } await protocol.ReadListEndAsync(cancellationToken); } isset_colVals = true; } else { await TProtocolUtil.SkipAsync(protocol, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(protocol, field.Type, cancellationToken); break; } await protocol.ReadFieldEndAsync(cancellationToken); } await protocol.ReadStructEndAsync(cancellationToken); if (!isset_colVals) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }
public async Task ReadAsync(TProtocol protocol, CancellationToken cancellationToken) { bool isset_columns = false; TField field; await protocol.ReadStructBeginAsync(cancellationToken); while (true) { field = await protocol.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Columns = new List <ColumnDesc>(); TList list = await protocol.ReadListBeginAsync(cancellationToken); for (int i = 0; i < list.Count; ++i) { ColumnDesc desc = new ColumnDesc(); await desc.ReadAsync(protocol, cancellationToken); Columns.Add(desc); } await protocol.ReadListEndAsync(cancellationToken); } isset_columns = true; } else { await TProtocolUtil.SkipAsync(protocol, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(protocol, field.Type, cancellationToken); break; } await protocol.ReadFieldEndAsync(cancellationToken); } await protocol.ReadStructEndAsync(cancellationToken); if (!isset_columns) { throw new TProtocolException(TProtocolException.INVALID_DATA); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_row = false; bool isset_mutations = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Row = await iprot.ReadBinaryAsync(cancellationToken); isset_row = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { Mutations = new List <TMutation>(); TList _list62 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i63 = 0; _i63 < _list62.Count; ++_i63) { TMutation _elem64; _elem64 = new TMutation(); await _elem64.ReadAsync(iprot, cancellationToken); Mutations.Add(_elem64); } await iprot.ReadListEndAsync(cancellationToken); } isset_mutations = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_row) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_mutations) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list29 = await iprot.ReadListBeginAsync(cancellationToken); Names = new List <SchemaPattern>(_list29.Count); for (int _i30 = 0; _i30 < _list29.Count; ++_i30) { SchemaPattern _elem31; _elem31 = new SchemaPattern(); await _elem31.ReadAsync(iprot, cancellationToken); Names.Add(_elem31); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.Struct) { Tags = new SchemaTagsPatterns(); await Tags.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { Value = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.Bool) { Success = await iprot.ReadBoolAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.List) { { TList _list3 = await iprot.ReadListBeginAsync(cancellationToken); Results = new List <global::APIGateway.Thrift.Generated.BaseTypes.Result>(_list3.Count); for (int _i4 = 0; _i4 < _list3.Count; ++_i4) { global::APIGateway.Thrift.Generated.BaseTypes.Result _elem5; _elem5 = new global::APIGateway.Thrift.Generated.BaseTypes.Result(); await _elem5.ReadAsync(iprot, cancellationToken); Results.Add(_elem5); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.Struct) { ResponseBase = new global::APIGateway.Thrift.Generated.BaseTypes.ResponseBase(); await ResponseBase.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_sessionId = false; bool isset_deviceIds = false; bool isset_measurementsList = false; bool isset_valuesList = false; bool isset_timestamps = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I64) { SessionId = await iprot.ReadI64Async(cancellationToken); isset_sessionId = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { TList _list87 = await iprot.ReadListBeginAsync(cancellationToken); DeviceIds = new List <string>(_list87.Count); for (int _i88 = 0; _i88 < _list87.Count; ++_i88) { string _elem89; _elem89 = await iprot.ReadStringAsync(cancellationToken); DeviceIds.Add(_elem89); } await iprot.ReadListEndAsync(cancellationToken); } isset_deviceIds = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.List) { { TList _list90 = await iprot.ReadListBeginAsync(cancellationToken); MeasurementsList = new List <List <string> >(_list90.Count); for (int _i91 = 0; _i91 < _list90.Count; ++_i91) { List <string> _elem92; { TList _list93 = await iprot.ReadListBeginAsync(cancellationToken); _elem92 = new List <string>(_list93.Count); for (int _i94 = 0; _i94 < _list93.Count; ++_i94) { string _elem95; _elem95 = await iprot.ReadStringAsync(cancellationToken); _elem92.Add(_elem95); } await iprot.ReadListEndAsync(cancellationToken); } MeasurementsList.Add(_elem92); } await iprot.ReadListEndAsync(cancellationToken); } isset_measurementsList = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.List) { { TList _list96 = await iprot.ReadListBeginAsync(cancellationToken); ValuesList = new List <byte[]>(_list96.Count); for (int _i97 = 0; _i97 < _list96.Count; ++_i97) { byte[] _elem98; _elem98 = await iprot.ReadBinaryAsync(cancellationToken); ValuesList.Add(_elem98); } await iprot.ReadListEndAsync(cancellationToken); } isset_valuesList = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.List) { { TList _list99 = await iprot.ReadListBeginAsync(cancellationToken); Timestamps = new List <long>(_list99.Count); for (int _i100 = 0; _i100 < _list99.Count; ++_i100) { long _elem101; _elem101 = await iprot.ReadI64Async(cancellationToken); Timestamps.Add(_elem101); } await iprot.ReadListEndAsync(cancellationToken); } isset_timestamps = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_sessionId) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_deviceIds) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_measurementsList) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_valuesList) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_timestamps) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list209 = await iprot.ReadListBeginAsync(cancellationToken); Users = new List <Contact>(_list209.Count); for (int _i210 = 0; _i210 < _list209.Count; ++_i210) { Contact _elem211; _elem211 = new Contact(); await _elem211.ReadAsync(iprot, cancellationToken); Users.Add(_elem211); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { TList _list212 = await iprot.ReadListBeginAsync(cancellationToken); Buddies = new List <Contact>(_list212.Count); for (int _i213 = 0; _i213 < _list212.Count; ++_i213) { Contact _elem214; _elem214 = new Contact(); await _elem214.ReadAsync(iprot, cancellationToken); Buddies.Add(_elem214); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_success = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Bool) { Success = await iprot.ReadBoolAsync(cancellationToken); isset_success = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.String) { Error = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.List) { { Readaccess = new List <string>(); TList _list13 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i14 = 0; _i14 < _list13.Count; ++_i14) { string _elem15; _elem15 = await iprot.ReadStringAsync(cancellationToken); Readaccess.Add(_elem15); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.List) { { Writeaccess = new List <string>(); TList _list16 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i17 = 0; _i17 < _list16.Count; ++_i17) { string _elem18; _elem18 = await iprot.ReadStringAsync(cancellationToken); Writeaccess.Add(_elem18); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_success) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { _from = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.String) { To = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.I32) { ToType = (MIDType)await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.String) { Id = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.I64) { CreatedTime = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 6: if (field.Type == TType.I64) { DeliveredTime = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 10: if (field.Type == TType.String) { Text = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 11: if (field.Type == TType.Struct) { Location = new Location(); await Location.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 14: if (field.Type == TType.Bool) { HasContent = await iprot.ReadBoolAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 15: if (field.Type == TType.I32) { ContentType = (ContentType)await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 17: if (field.Type == TType.String) { ContentPreview = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 18: if (field.Type == TType.Map) { { TMap _map157 = await iprot.ReadMapBeginAsync(cancellationToken); ContentMetadata = new Dictionary <string, string>(_map157.Count); for (int _i158 = 0; _i158 < _map157.Count; ++_i158) { string _key159; string _val160; _key159 = await iprot.ReadStringAsync(cancellationToken); _val160 = await iprot.ReadStringAsync(cancellationToken); ContentMetadata[_key159] = _val160; } await iprot.ReadMapEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 19: if (field.Type == TType.Byte) { SessionId = await iprot.ReadByteAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 20: if (field.Type == TType.List) { { TList _list161 = await iprot.ReadListBeginAsync(cancellationToken); Chunks = new List <byte[]>(_list161.Count); for (int _i162 = 0; _i162 < _list161.Count; ++_i162) { byte[] _elem163; _elem163 = await iprot.ReadBinaryAsync(cancellationToken); Chunks.Add(_elem163); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 21: if (field.Type == TType.String) { RelatedMessageId = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 22: if (field.Type == TType.I32) { MessageRelationType = (MessageRelationType)await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 23: if (field.Type == TType.I64) { ReadCount = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 24: if (field.Type == TType.I32) { RelatedMessageServiceCode = (ServiceCode)await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_links = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list3 = await iprot.ReadListBeginAsync(cancellationToken); Links = new List <global::Jaeger.Thrift.Agent.DependencyLink>(_list3.Count); for (int _i4 = 0; _i4 < _list3.Count; ++_i4) { global::Jaeger.Thrift.Agent.DependencyLink _elem5; _elem5 = new global::Jaeger.Thrift.Agent.DependencyLink(); await _elem5.ReadAsync(iprot, cancellationToken); Links.Add(_elem5); } await iprot.ReadListEndAsync(cancellationToken); } isset_links = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_links) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list39 = await iprot.ReadListBeginAsync(cancellationToken); Column_names = new List <byte[]>(_list39.Count); for (int _i40 = 0; _i40 < _list39.Count; ++_i40) { byte[] _elem41; _elem41 = await iprot.ReadBinaryAsync(cancellationToken); Column_names.Add(_elem41); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.Struct) { Slice_range = new global::Apache.Cassandra.Test.SliceRange(); await Slice_range.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { TList _list20 = await iprot.ReadListBeginAsync(cancellationToken); CurrencyExchangeRates = new List <PaidCallCurrencyExchangeRate>(_list20.Count); for (int _i21 = 0; _i21 < _list20.Count; ++_i21) { PaidCallCurrencyExchangeRate _elem22; _elem22 = new PaidCallCurrencyExchangeRate(); await _elem22.ReadAsync(iprot, cancellationToken); CurrencyExchangeRates.Add(_elem22); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { TList _list23 = await iprot.ReadListBeginAsync(cancellationToken); RecommendedCountryCodes = new List <string>(_list23.Count); for (int _i24 = 0; _i24 < _list23.Count; ++_i24) { string _elem25; _elem25 = await iprot.ReadStringAsync(cancellationToken); RecommendedCountryCodes.Add(_elem25); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.List) { { TList _list26 = await iprot.ReadListBeginAsync(cancellationToken); AdCountries = new List <PaidCallAdCountry>(_list26.Count); for (int _i27 = 0; _i27 < _list26.Count; ++_i27) { PaidCallAdCountry _elem28; _elem28 = new PaidCallAdCountry(); await _elem28.ReadAsync(iprot, cancellationToken); AdCountries.Add(_elem28); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public static async Task SkipAsync(TProtocol protocol, TType type, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); protocol.IncrementRecursionDepth(); try { switch (type) { case TType.Bool: await protocol.ReadBoolAsync(cancellationToken); break; case TType.Byte: await protocol.ReadByteAsync(cancellationToken); break; case TType.I16: await protocol.ReadI16Async(cancellationToken); break; case TType.I32: await protocol.ReadI32Async(cancellationToken); break; case TType.I64: await protocol.ReadI64Async(cancellationToken); break; case TType.Double: await protocol.ReadDoubleAsync(cancellationToken); break; case TType.String: // Don't try to decode the string, just skip it. await protocol.ReadBinaryAsync(cancellationToken); break; case TType.Struct: await protocol.ReadStructBeginAsync(cancellationToken); while (true) { var field = await protocol.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } await SkipAsync(protocol, field.Type, cancellationToken); await protocol.ReadFieldEndAsync(cancellationToken); } await protocol.ReadStructEndAsync(cancellationToken); break; case TType.Map: var map = await protocol.ReadMapBeginAsync(cancellationToken); for (var i = 0; i < map.Count; i++) { await SkipAsync(protocol, map.KeyType, cancellationToken); await SkipAsync(protocol, map.ValueType, cancellationToken); } await protocol.ReadMapEndAsync(cancellationToken); break; case TType.Set: var set = await protocol.ReadSetBeginAsync(cancellationToken); for (var i = 0; i < set.Count; i++) { await SkipAsync(protocol, set.ElementType, cancellationToken); } await protocol.ReadSetEndAsync(cancellationToken); break; case TType.List: var list = await protocol.ReadListBeginAsync(cancellationToken); for (var i = 0; i < list.Count; i++) { await SkipAsync(protocol, list.ElementType, cancellationToken); } await protocol.ReadListEndAsync(cancellationToken); break; default: throw new TProtocolException(TProtocolException.INVALID_DATA, "Unknown data type " + type.ToString("d")); } } finally { protocol.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_page_locations = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Page_locations = new List <PageLocation>(); TList _list24 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i25 = 0; _i25 < _list24.Count; ++_i25) { PageLocation _elem26; _elem26 = new PageLocation(); await _elem26.ReadAsync(iprot, cancellationToken); Page_locations.Add(_elem26); } await iprot.ReadListEndAsync(cancellationToken); } isset_page_locations = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_page_locations) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_row = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Row = await iprot.ReadBinaryAsync(cancellationToken); isset_row = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { Columns = new List <TColumn>(); TList _list8 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i9 = 0; _i9 < _list8.Count; ++_i9) { TColumn _elem10; _elem10 = new TColumn(); await _elem10.ReadAsync(iprot, cancellationToken); Columns.Add(_elem10); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.I64) { Timestamp = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.Struct) { TimeRange = new TTimeRange(); await TimeRange.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.I32) { MaxVersions = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 6: if (field.Type == TType.String) { FilterString = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 7: if (field.Type == TType.Map) { { Attributes = new Dictionary <byte[], byte[]>(); TMap _map11 = await iprot.ReadMapBeginAsync(cancellationToken); for (int _i12 = 0; _i12 < _map11.Count; ++_i12) { byte[] _key13; byte[] _val14; _key13 = await iprot.ReadBinaryAsync(cancellationToken); _val14 = await iprot.ReadBinaryAsync(cancellationToken); Attributes[_key13] = _val14; } await iprot.ReadMapEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 8: if (field.Type == TType.Struct) { Authorizations = new TAuthorization(); await Authorizations.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_row) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { SquareChats = new List <SquareChat>(); TList _list320 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i321 = 0; _i321 < _list320.Count; ++_i321) { SquareChat _elem322; _elem322 = new SquareChat(); await _elem322.ReadAsync(iprot, cancellationToken); SquareChats.Add(_elem322); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.String) { ContinuationToken = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.I32) { TotalSquareChatCount = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.Map) { { SquareChatStatuses = new Dictionary <string, SquareChatStatus>(); TMap _map323 = await iprot.ReadMapBeginAsync(cancellationToken); for (int _i324 = 0; _i324 < _map323.Count; ++_i324) { string _key325; SquareChatStatus _val326; _key325 = await iprot.ReadStringAsync(cancellationToken); _val326 = new SquareChatStatus(); await _val326.ReadAsync(iprot, cancellationToken); SquareChatStatuses[_key325] = _val326; } await iprot.ReadMapEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public static async Task SkipAsync(TProtocol prot, TType type, CancellationToken cancellationToken) { if (cancellationToken.IsCancellationRequested) { await Task.FromCanceled(cancellationToken); } prot.IncrementRecursionDepth(); try { switch (type) { case TType.Bool: await prot.ReadBoolAsync(cancellationToken); break; case TType.Byte: await prot.ReadByteAsync(cancellationToken); break; case TType.I16: await prot.ReadI16Async(cancellationToken); break; case TType.I32: await prot.ReadI32Async(cancellationToken); break; case TType.I64: await prot.ReadI64Async(cancellationToken); break; case TType.Double: await prot.ReadDoubleAsync(cancellationToken); break; case TType.String: // Don't try to decode the string, just skip it. await prot.ReadBinaryAsync(cancellationToken); break; case TType.Struct: await prot.ReadStructBeginAsync(cancellationToken); while (true) { var field = await prot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } await SkipAsync(prot, field.Type, cancellationToken); await prot.ReadFieldEndAsync(cancellationToken); } await prot.ReadStructEndAsync(cancellationToken); break; case TType.Map: var map = await prot.ReadMapBeginAsync(cancellationToken); for (var i = 0; i < map.Count; i++) { await SkipAsync(prot, map.KeyType, cancellationToken); await SkipAsync(prot, map.ValueType, cancellationToken); } await prot.ReadMapEndAsync(cancellationToken); break; case TType.Set: var set = await prot.ReadSetBeginAsync(cancellationToken); for (var i = 0; i < set.Count; i++) { await SkipAsync(prot, set.ElementType, cancellationToken); } await prot.ReadSetEndAsync(cancellationToken); break; case TType.List: var list = await prot.ReadListBeginAsync(cancellationToken); for (var i = 0; i < list.Count; i++) { await SkipAsync(prot, list.ElementType, cancellationToken); } await prot.ReadListEndAsync(cancellationToken); break; default: throw new TProtocolException(TProtocolException.INVALID_DATA, "Unknown data type " + type.ToString("d")); } } finally { prot.DecrementRecursionDepth(); } }