public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_serviceName = 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) { ServiceName = await iprot.ReadStringAsync(cancellationToken); isset_serviceName = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { TList _list25 = await iprot.ReadListBeginAsync(cancellationToken); Tags = new List <global::Jaeger.Thrift.Tag>(_list25.Count); for (int _i26 = 0; _i26 < _list25.Count; ++_i26) { global::Jaeger.Thrift.Tag _elem27; _elem27 = new global::Jaeger.Thrift.Tag(); await _elem27.ReadAsync(iprot, cancellationToken); Tags.Add(_elem27); } 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_serviceName) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_timestamp = false; bool isset_fields = 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) { Timestamp = await iprot.ReadI64Async(cancellationToken); isset_timestamp = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { TList _list3 = await iprot.ReadListBeginAsync(cancellationToken); Fields = new List <global::Jaeger.Thrift.Tag>(_list3.Count); for (int _i4 = 0; _i4 < _list3.Count; ++_i4) { global::Jaeger.Thrift.Tag _elem5; _elem5 = new global::Jaeger.Thrift.Tag(); await _elem5.ReadAsync(iprot, cancellationToken); Fields.Add(_elem5); } await iprot.ReadListEndAsync(cancellationToken); } isset_fields = 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_timestamp) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_fields) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_traceIdLow = false; bool isset_traceIdHigh = false; bool isset_spanId = false; bool isset_parentSpanId = false; bool isset_operationName = false; bool isset_flags = false; bool isset_startTime = false; bool isset_duration = 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) { TraceIdLow = await iprot.ReadI64Async(cancellationToken); isset_traceIdLow = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.I64) { TraceIdHigh = await iprot.ReadI64Async(cancellationToken); isset_traceIdHigh = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.I64) { SpanId = await iprot.ReadI64Async(cancellationToken); isset_spanId = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.I64) { ParentSpanId = await iprot.ReadI64Async(cancellationToken); isset_parentSpanId = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.String) { OperationName = await iprot.ReadStringAsync(cancellationToken); isset_operationName = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 6: if (field.Type == TType.List) { { TList _list11 = await iprot.ReadListBeginAsync(cancellationToken); References = new List <global::Jaeger.Thrift.SpanRef>(_list11.Count); for (int _i12 = 0; _i12 < _list11.Count; ++_i12) { global::Jaeger.Thrift.SpanRef _elem13; _elem13 = new global::Jaeger.Thrift.SpanRef(); await _elem13.ReadAsync(iprot, cancellationToken); References.Add(_elem13); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 7: if (field.Type == TType.I32) { Flags = await iprot.ReadI32Async(cancellationToken); isset_flags = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 8: if (field.Type == TType.I64) { StartTime = await iprot.ReadI64Async(cancellationToken); isset_startTime = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 9: if (field.Type == TType.I64) { Duration = await iprot.ReadI64Async(cancellationToken); isset_duration = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 10: if (field.Type == TType.List) { { TList _list14 = await iprot.ReadListBeginAsync(cancellationToken); Tags = new List <global::Jaeger.Thrift.Tag>(_list14.Count); for (int _i15 = 0; _i15 < _list14.Count; ++_i15) { global::Jaeger.Thrift.Tag _elem16; _elem16 = new global::Jaeger.Thrift.Tag(); await _elem16.ReadAsync(iprot, cancellationToken); Tags.Add(_elem16); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 11: if (field.Type == TType.List) { { TList _list17 = await iprot.ReadListBeginAsync(cancellationToken); Logs = new List <global::Jaeger.Thrift.Log>(_list17.Count); for (int _i18 = 0; _i18 < _list17.Count; ++_i18) { global::Jaeger.Thrift.Log _elem19; _elem19 = new global::Jaeger.Thrift.Log(); await _elem19.ReadAsync(iprot, cancellationToken); Logs.Add(_elem19); } 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_traceIdLow) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_traceIdHigh) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_spanId) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_parentSpanId) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_operationName) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_flags) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_startTime) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_duration) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }