private void _read() { _type = ((InstTypes)m_io.ReadU1()); _filename = KaitaiStream.BytesTerminate(m_io.ReadBytes(12), 0, false); switch (Type) { case InstTypes.Sample: { _body = new Sampled(m_io, this, m_root); break; } default: { _body = new Adlib(m_io, this, m_root); break; } } _tuningHz = m_io.ReadU4le(); _reserved2 = m_io.ReadBytes(12); _sampleName = KaitaiStream.BytesTerminate(m_io.ReadBytes(28), 0, false); _magic = m_io.ReadBytes(4); if (!((KaitaiStream.ByteArrayCompare(Magic, new byte[] { 83, 67, 82, 83 }) == 0))) { throw new ValidationNotEqualError(new byte[] { 83, 67, 82, 83 }, Magic, M_Io, "/types/instrument/seq/6"); } }
public override int GetHashCode() { int hashcode = 157; unchecked { hashcode = (hashcode * 397) + TraceId.GetHashCode(); hashcode = (hashcode * 397) + Sampled.GetHashCode(); hashcode = (hashcode * 397) + Baggage.GetHashCode(); } return(hashcode); }
public override int GetHashCode() { int hashcode = 157; unchecked { hashcode = (hashcode * 397) + ServerRole.GetHashCode(); hashcode = (hashcode * 397) + Sampled.GetHashCode(); hashcode = (hashcode * 397) + Baggage.GetHashCode(); hashcode = (hashcode * 397) + Downstream.GetHashCode(); } return(hashcode); }
/// <summary> /// Write instruction operands into bytecode stream. /// </summary> /// <param name="writer">Bytecode writer.</param> public override void WriteOperands(WordWriter writer) { SampledType.Write(writer); Dim.Write(writer); Depth.Write(writer); Arrayed.Write(writer); MS.Write(writer); Sampled.Write(writer); ImageFormat.Write(writer); if (AccessQualifier != null) { AccessQualifier.Write(writer); } }
private void Sampling(DateTime next_start_time) { if (sampling_init_) { var data = new decimal[layer_data_.Length]; OnSamplingEnd(data); Sampled?.Invoke(this, data); } sampling_init_ = true; sampling_start_time_ = next_start_time; OnSamplingStart(); }
/// <summary> /// Calculate number of words to fit complete instruction bytecode. /// </summary> /// <returns>Number of words in instruction bytecode.</returns> public override uint GetWordCount() { uint wordCount = 0; wordCount += IdResult.GetWordCount(); wordCount += SampledType.GetWordCount(); wordCount += Dim.GetWordCount(); wordCount += Depth.GetWordCount(); wordCount += Arrayed.GetWordCount(); wordCount += MS.GetWordCount(); wordCount += Sampled.GetWordCount(); wordCount += ImageFormat.GetWordCount(); wordCount += AccessQualifier?.GetWordCount() ?? 0u; return(wordCount); }
public override int GetHashCode() { int hashcode = 157; unchecked { if ((TraceId != null)) { hashcode = (hashcode * 397) + TraceId.GetHashCode(); } hashcode = (hashcode * 397) + Sampled.GetHashCode(); if ((Baggage != null)) { hashcode = (hashcode * 397) + Baggage.GetHashCode(); } } return(hashcode); }
public override string ToString() { var sb = new StringBuilder("ObservedSpan("); if ((TraceId != null)) { sb.Append(", TraceId: "); TraceId.ToString(sb); } sb.Append(", Sampled: "); Sampled.ToString(sb); if ((Baggage != null)) { sb.Append(", Baggage: "); Baggage.ToString(sb); } sb.Append(')'); return(sb.ToString()); }
private void _read() { _type = ((InstTypes)m_io.ReadU1()); _filename = KaitaiStream.BytesTerminate(m_io.ReadBytes(12), 0, false); switch (Type) { case InstTypes.Sample: { _body = new Sampled(m_io, this, m_root); break; } default: { _body = new Adlib(m_io, this, m_root); break; } } _tuningHz = m_io.ReadU4le(); _reserved2 = m_io.ReadBytes(12); _sampleName = KaitaiStream.BytesTerminate(m_io.ReadBytes(28), 0, false); _magic = m_io.EnsureFixedContents(new byte[] { 83, 67, 82, 83 }); }
public override int GetHashCode() { int hashcode = 157; unchecked { if ((ServerRole != null)) { hashcode = (hashcode * 397) + ServerRole.GetHashCode(); } hashcode = (hashcode * 397) + Sampled.GetHashCode(); if ((Baggage != null)) { hashcode = (hashcode * 397) + Baggage.GetHashCode(); } if ((Downstream != null)) { hashcode = (hashcode * 397) + Downstream.GetHashCode(); } } return(hashcode); }
public override int GetHashCode() { int hash = 1; if (TraceId != 0UL) { hash ^= TraceId.GetHashCode(); } if (SpanId != 0UL) { hash ^= SpanId.GetHashCode(); } if (Sampled != false) { hash ^= Sampled.GetHashCode(); } hash ^= BaggageItems.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override string ToString() { var sb = new StringBuilder("StartTraceRequest("); if ((ServerRole != null)) { sb.Append(", ServerRole: "); ServerRole.ToString(sb); } sb.Append(", Sampled: "); Sampled.ToString(sb); if ((Baggage != null)) { sb.Append(", Baggage: "); Baggage.ToString(sb); } if ((Downstream != null)) { sb.Append(", Downstream: "); Downstream.ToString(sb); } sb.Append(')'); return(sb.ToString()); }