ActivitySpanId ActivitySpanId ActivitySpanId ActivitySpanId Struct

定義

代表以 W3C 標準作為格式基礎的 SpanIdRepresents a SpanId formatted based on a W3C standard.

public value class ActivitySpanId : IEquatable<System::Diagnostics::ActivitySpanId>
public struct ActivitySpanId : IEquatable<System.Diagnostics.ActivitySpanId>
type ActivitySpanId = struct
Public Structure ActivitySpanId
Implements IEquatable(Of ActivitySpanId)
繼承
ActivitySpanIdActivitySpanIdActivitySpanIdActivitySpanId
實作

備註

ActivitySpanId結構會反映 W3C 標準針對追蹤中單一範圍的識別碼所需的格式。The ActivitySpanId structure reflects the format that the W3C standard requires for the ID of a single span in a trace. 其中包含8個位元組, 通常會顯示為16個十六進位字元。It consists of 8 bytes, typically displayed as 16 hexadecimal characters. ActivitySpanIdSpanId針對其Activity.IdFormat為的傳回W3CActivityAn ActivitySpanId is returned by the SpanId for an Activity whose Activity.IdFormat is W3C.

ActivitySpanId因為是包含8個位元組的結構, 所以可以傳址方式傳遞。Because an ActivitySpanId is a structure that contains 8 bytes, it can be passed by reference. ActivitySpanId包含在十六進位字串表示之間進行轉換的方法, 會嘗試避免變更格式, 直到其必須存在, 並在建立之後快取其字串表示。ActivitySpanId contains methods for converting to and from hexadecimal string representation, tries to avoid changing formats until it has to, and caches its string representation after it is created. 它主要是用來作為交換類型。It is mostly useful as an exchange type.

方法

CopyTo(Span<Byte>) CopyTo(Span<Byte>) CopyTo(Span<Byte>) CopyTo(Span<Byte>)

將目前 ActivitySpanId 的 8 個位元組複製到指定範圍。Copies the 8 bytes of the current ActivitySpanId to a specified span.

CreateFromBytes(ReadOnlySpan<Byte>) CreateFromBytes(ReadOnlySpan<Byte>) CreateFromBytes(ReadOnlySpan<Byte>) CreateFromBytes(ReadOnlySpan<Byte>)

從八位元組的唯讀範圍建立新 ActivitySpanId 值。Creates a new ActivitySpanId value from a read-only span of eight bytes.

CreateFromString(ReadOnlySpan<Char>) CreateFromString(ReadOnlySpan<Char>) CreateFromString(ReadOnlySpan<Char>) CreateFromString(ReadOnlySpan<Char>)

從 16 個十六進位字元的唯讀範圍建立新 ActivitySpanId 值。Creates a new ActivitySpanId value from a read-only span of 16 hexadecimal characters.

CreateFromUtf8String(ReadOnlySpan<Byte>) CreateFromUtf8String(ReadOnlySpan<Byte>) CreateFromUtf8String(ReadOnlySpan<Byte>) CreateFromUtf8String(ReadOnlySpan<Byte>)

從 UTF8 編碼位元組唯讀範圍建立新的 ActivitySpanId 值。Creates a new ActivitySpanId value from a read-only span of UTF8-encoded bytes.

CreateRandom() CreateRandom() CreateRandom() CreateRandom()

根據隨機數字 (極可能是唯一值) 建立新的 ActivitySpanIdCreates a new ActivitySpanId based on a random number (that is very likely to be unique).

Equals(ActivitySpanId) Equals(ActivitySpanId) Equals(ActivitySpanId) Equals(ActivitySpanId)

判斷此執行個體和指定的 ActivitySpanId 執行個體是否具有相同值。Determines whether this instance and the specified ActivitySpanId instance have the same value.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

目前的執行個體和指定的物件 (同時還必須是 ActivitySpanId 執行個體) 有相同的值。the current instance and a specified object, which also must be an ActivitySpanId instance, have the same value.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

傳回 SpanId 的雜湊碼。Returns the hash code of the SpanId.

ToHexString() ToHexString() ToHexString() ToHexString()

傳回代表此範圍識別碼的 16 字元十六進位字串。Returns a 16-character hexadecimal string that represents this span ID.

ToString() ToString() ToString() ToString()

傳回代表此範圍識別碼的 16 字元十六進位字串。Returns a 16-character hexadecimal string that represents this span ID.

運算子

Equality(ActivitySpanId, ActivitySpanId) Equality(ActivitySpanId, ActivitySpanId) Equality(ActivitySpanId, ActivitySpanId) Equality(ActivitySpanId, ActivitySpanId)

判斷兩個指定的 ActivitySpanId 執行個體是否有相同的值。Determines whether two specified ActivitySpanId instances have the same value.

Inequality(ActivitySpanId, ActivitySpanId) Inequality(ActivitySpanId, ActivitySpanId) Inequality(ActivitySpanId, ActivitySpanId) Inequality(ActivitySpanId, ActivitySpanId)

判斷兩個指定的 ActivitySpanId 執行個體是否有相等的值。Determine whether two specified ActivitySpanId instances have unequal values.

適用於