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.Struct) { Request = new StartTraceRequest(); await Request.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 StartTraceRequest DeepCopy() { var tmp2 = new StartTraceRequest(); if ((ServerRole != null)) { tmp2.ServerRole = this.ServerRole; } tmp2.Sampled = this.Sampled; if ((Baggage != null)) { tmp2.Baggage = this.Baggage; } if ((Downstream != null)) { tmp2.Downstream = (global::Jaeger.Thrift.Crossdock.Downstream) this.Downstream.DeepCopy(); } return(tmp2); }
public async Task <TraceResponse> startTraceAsync(StartTraceRequest request, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("startTrace", TMessageType.Call, SeqId), cancellationToken); var args = new startTraceArgs(); args.Request = request; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new startTraceResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "startTrace failed: unknown result"); }