Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Diagnostics.​ActivitySpanId
Assembly: System.Diagnostics.DiagnosticSource
Implemented Interfaces
Represents a <see cref="P:System.Diagnostics.Activity.SpanId" /> formatted based on a W3C standard.
Methods
public
void
CopyTo​(Span<​byte> destination)
Copies the 8 bytes of the current <see cref="T:System.Diagnostics.ActivitySpanId" /> to a specified span.
destination
The span to which the 8 bytes of the SpanID are to be copied.
public static
ActivitySpanId
CreateFromBytes​(ReadOnlySpan<​byte> idData)
Creates a new <see cref="T:System.Diagnostics.ActivitySpanId" /> value from a read-only span of eight bytes.
Returns The new span ID.
idData
A read-only span of eight bytes.
public static
ActivitySpanId
CreateFromString​(ReadOnlySpan<​char> idData)
Creates a new <see cref="T:System.Diagnostics.ActivitySpanId" /> value from a read-only span of 16 hexadecimal characters.
Returns The new span ID.
idData
A span that contains 16 hexadecimal characters.
public static
ActivitySpanId
CreateFromUtf8String​(ReadOnlySpan<​byte> idData)
Creates a new <see cref="T:System.Diagnostics.ActivitySpanId" /> value from a read-only span of UTF8-encoded bytes.
Returns The new span ID.
idData
A read-only span of UTF8-encoded bytes.
public static
ActivitySpanId
CreateRandom​()
Creates a new <see cref="T:System.Diagnostics.ActivitySpanId" /> based on a random number (that is very likely to be unique).
Returns The new span ID.
public
bool
Equals​(ActivitySpanId spanId)
Determines whether this instance and the specified <see cref="T:System.Diagnostics.ActivitySpanId" /> instance have the same value.
Returns <see langword="true" /> if <paramref name="spanId" /> has the same hex value as the current instance; otherwise, <see langword="false" /> .
spanId
The instance to compare.
public
bool
Equals​(object obj)
the current instance and a specified object, which also must be an <see cref="T:System.Diagnostics.ActivitySpanId" /> instance, have the same value.
Returns <see langword="true" /> if <paramref name="obj" /> is an instance of <see cref="T:System.Diagnostics.ActivitySpanId" /> and has the same hex value as the current instance; otherwise, <see langword="false" /> .
obj
The object to compare.
public
int
GetHashCode​()
Returns the hash code of the SpanId.
Returns The hash code of the SpanId.
public
string
ToHexString​()
Returns a 16-character hexadecimal string that represents this span ID.
Returns The 16-character hexadecimal string representation of this span ID.
public
string
ToString​()
Returns a 16-character hexadecimal string that represents this span ID.
Returns The 16-character hexadecimal string representation of this span ID.
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object