public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("Batch"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); field.Name = "process"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Process.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); field.Name = "spans"; field.Type = TType.List; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.Struct, Spans.Count), cancellationToken); foreach (Span _iter23 in Spans) { await _iter23.WriteAsync(oprot, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("Batch"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if ((Process != null)) { field.Name = "process"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Process.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if ((Spans != null)) { field.Name = "spans"; field.Type = TType.List; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.Struct, Spans.Count), cancellationToken); foreach (global::Jaeger.Thrift.Span _iter36 in Spans) { await _iter36.WriteAsync(oprot, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (__isset.seqNo) { field.Name = "seqNo"; field.Type = TType.I64; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI64Async(SeqNo, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if ((Stats != null) && __isset.stats) { field.Name = "stats"; field.Type = TType.Struct; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Stats.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }