ActivityContext.TryParse(String, String, ActivityContext) Method

Definition

Tries to parse the W3C trace context headers to an ActivityContext object.

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);
static member TryParse : string * string * ActivityContext -> bool
Public Shared Function TryParse (traceParent As String, traceState As String, ByRef context As ActivityContext) As Boolean

Parameters

traceParent
String

The W3C trace parent header.

traceState
String

The W3C trace state.

context
ActivityContext

When this method returns true, the ActivityContext object created from the parsing operation.

Returns

Boolean

true if the parsing was successful; false otherwise.

Applies to