AsyncCausalityTracer.TraceOperationCreation 方法

定義

記錄非同步作業的建立。

public:
 static void TraceOperationCreation(CausalityTraceLevel traceLevel, CausalitySource source, Platform::Guid platformId, unsigned long long operationId, Platform::String ^ operationName, unsigned long long relatedContext);
 static void TraceOperationCreation(CausalityTraceLevel const& traceLevel, CausalitySource const& source, winrt::guid const& platformId, uint64_t const& operationId, winrt::hstring const& operationName, uint64_t const& relatedContext);
public static void TraceOperationCreation(CausalityTraceLevel traceLevel, CausalitySource source, Guid platformId, ulong operationId, string operationName, ulong relatedContext);
function traceOperationCreation(traceLevel, source, platformId, operationId, operationName, relatedContext)
Public Shared Sub TraceOperationCreation (traceLevel As CausalityTraceLevel, source As CausalitySource, platformId As Guid, operationId As ULong, operationName As String, relatedContext As ULong)

參數

traceLevel
CausalityTraceLevel

追蹤層級。

source
CausalitySource

追蹤來源。

platformId
Guid

Platform::Guid

winrt::guid

作業類型的識別碼。

operationId
UInt64

unsigned long long

uint64_t

非同步作業的識別碼,在作業存留期的平臺內是唯一的。

operationName
String

Platform::String

winrt::hstring

非同步工作的人類可讀描述。

relatedContext
UInt64

unsigned long long

uint64_t

與這項作業相關的其他資訊。

備註

使用 TraceOperationCreation 方法來記錄非同步作業的建立。 非同步作業代表以非同步方式排程的零個或多個相關同步工作專案群組。 每個非同步作業都有 128 位 GUID ,可識別作業類型,例如 BCL 工作和 WinJS Promise,以及必須在非同步作業存留期內平臺內唯一的 UInt64 作業識別碼。 operationId的良好選擇包括基礎物件的原生指標,或針對每個新作業遞增的整數。 operationName應該是非同步工作的人類可讀描述。 relatedCoNtext會關聯與此作業相關的任何其他資訊。

適用於

另請參閱