ActivityTraceId.CreateFromBytes(ReadOnlySpan<Byte>) 方法

定义

从一个包含 16 个字节的只读范围创建一个新的 ActivityTraceId 值。Creates a new ActivityTraceId value from a read-only span of 16 bytes.

public:
 static System::Diagnostics::ActivityTraceId CreateFromBytes(ReadOnlySpan<System::Byte> idData);
public static System.Diagnostics.ActivityTraceId CreateFromBytes (ReadOnlySpan<byte> idData);
static member CreateFromBytes : ReadOnlySpan<byte> -> System.Diagnostics.ActivityTraceId
Public Shared Function CreateFromBytes (idData As ReadOnlySpan(Of Byte)) As ActivityTraceId

参数

idData
ReadOnlySpan<Byte>

一个包含 16 个字节的只读范围。A read-only span of 16 bytes.

返回

ActivityTraceId

新的跟踪 ID。The new trace ID.

例外

idData 不包含 8 个字节。idData does not contain eight bytes.

适用于