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 _list41 = await iprot.ReadListBeginAsync(cancellationToken); Batches = new List <global::Jaeger.Thrift.Batch>(_list41.Count); for (int _i42 = 0; _i42 < _list41.Count; ++_i42) { global::Jaeger.Thrift.Batch _elem43; _elem43 = new global::Jaeger.Thrift.Batch(); await _elem43.ReadAsync(iprot, cancellationToken); Batches.Add(_elem43); } 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 emitBatchAsync(global::Jaeger.Thrift.Batch batch, CancellationToken cancellationToken = default) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("emitBatch", TMessageType.Oneway, SeqId), cancellationToken); var args = new InternalStructs.emitBatchArgs() { Batch = batch, }; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); }
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.Struct) { Batch = new global::Jaeger.Thrift.Batch(); await Batch.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(); } }