public BinaryAnnotation DeepCopy() { var tmp4 = new BinaryAnnotation(); if ((Key != null) && __isset.key) { tmp4.Key = this.Key; } tmp4.__isset.key = this.__isset.key; if ((Value != null) && __isset.@value) { tmp4.Value = this.Value.ToArray(); } tmp4.__isset.@value = this.__isset.@value; if (__isset.annotation_type) { tmp4.Annotation_type = this.Annotation_type; } tmp4.__isset.annotation_type = this.__isset.annotation_type; if ((Host != null) && __isset.host) { tmp4.Host = (global::Jaeger.Thrift.Agent.Zipkin.Endpoint) this.Host.DeepCopy(); } tmp4.__isset.host = this.__isset.host; return(tmp4); }
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.I64) { Trace_id = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.String) { Name = await iprot.ReadStringAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.I64) { Id = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.I64) { Parent_id = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 6: if (field.Type == TType.List) { { TList _list0 = await iprot.ReadListBeginAsync(cancellationToken); Annotations = new List <Annotation>(_list0.Count); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { Annotation _elem2; _elem2 = new Annotation(); await _elem2.ReadAsync(iprot, cancellationToken); Annotations.Add(_elem2); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 8: if (field.Type == TType.List) { { TList _list3 = await iprot.ReadListBeginAsync(cancellationToken); Binary_annotations = new List <BinaryAnnotation>(_list3.Count); for (int _i4 = 0; _i4 < _list3.Count; ++_i4) { BinaryAnnotation _elem5; _elem5 = new BinaryAnnotation(); await _elem5.ReadAsync(iprot, cancellationToken); Binary_annotations.Add(_elem5); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 9: if (field.Type == TType.Bool) { Debug = await iprot.ReadBoolAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 10: if (field.Type == TType.I64) { Timestamp = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 11: if (field.Type == TType.I64) { Duration = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 12: if (field.Type == TType.I64) { Trace_id_high = await iprot.ReadI64Async(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(); } }