Edit

Share via


ActivityContext.TryParse Method

Definition

Overloads

TryParse(String, String, ActivityContext)

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

TryParse(String, String, Boolean, ActivityContext)

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

TryParse(String, String, ActivityContext)

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

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);
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

true if the parsing was successful; false otherwise.

Applies to

TryParse(String, String, Boolean, ActivityContext)

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

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

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

Parameters

traceParent
String

The W3C trace parent header.

traceState
String

The W3C trace state.

isRemote
Boolean

true to propagate the context from the remote parent; otherwise, false.

context
ActivityContext

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

Returns

true if the operation succeeds; false otherwise.

Applies to