ActivityContext.TryParse 方法

定义

重载

TryParse(String, String, ActivityContext)

尝试将 W3C 跟踪上下文标头分析为 ActivityContext 对象。

TryParse(String, String, Boolean, ActivityContext)

尝试将 W3C 跟踪上下文标头解析为 ActivityContext 对象。

TryParse(String, String, ActivityContext)

Source:
ActivityContext.cs
Source:
ActivityContext.cs
Source:
ActivityContext.cs

尝试将 W3C 跟踪上下文标头分析为 ActivityContext 对象。

public:
 static bool TryParse(System::String ^ traceParent, System::String ^ traceState, [Runtime::InteropServices::Out] System::Diagnostics::ActivityContext % context);
public static bool TryParse (string traceParent, string? traceState, out System.Diagnostics.ActivityContext context);
public static bool TryParse (string? traceParent, string? traceState, out System.Diagnostics.ActivityContext context);
static member TryParse : string * string * ActivityContext -> bool
Public Shared Function TryParse (traceParent As String, traceState As String, ByRef context As ActivityContext) As Boolean

参数

traceParent
String

W3C 跟踪父标头。

traceState
String

W3C 跟踪状态。

context
ActivityContext

此方法返回 true 时,分析操作创建的 ActivityContext 对象。

返回

如果分析成功,则为 true;否则为 false

适用于

TryParse(String, String, Boolean, ActivityContext)

Source:
ActivityContext.cs
Source:
ActivityContext.cs
Source:
ActivityContext.cs

尝试将 W3C 跟踪上下文标头解析为 ActivityContext 对象。

public:
 static bool TryParse(System::String ^ traceParent, System::String ^ traceState, bool isRemote, [Runtime::InteropServices::Out] System::Diagnostics::ActivityContext % context);
public static bool TryParse (string? traceParent, string? traceState, bool isRemote, out System.Diagnostics.ActivityContext context);
static member TryParse : string * string * bool * ActivityContext -> bool
Public Shared Function TryParse (traceParent As String, traceState As String, isRemote As Boolean, ByRef context As ActivityContext) As Boolean

参数

traceParent
String

W3C 跟踪父标头。

traceState
String

W3C 跟踪状态。

isRemote
Boolean

true 从远程父级传播上下文;否则为 false

context
ActivityContext

此方法返回时,包含 ActivityContext 通过分析操作创建的对象。

返回

如果操作成功,则为 true;否则为 false

适用于