共用方式為


ActivityContext.TryParse 方法

定義

多載

TryParse(String, String, ActivityContext)

嘗試將 W3C 追蹤內容標頭剖析為 ActivityContext 物件。

TryParse(String, String, Boolean, ActivityContext)

嘗試將 W3C 追蹤內容標頭剖析為 ActivityContext 物件。

TryParse(String, String, ActivityContext)

來源:
ActivityContext.cs
來源:
ActivityContext.cs
來源:
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)

來源:
ActivityContext.cs
來源:
ActivityContext.cs
來源:
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

適用於