TraceListener.TraceTransfer 方法

定義

寫入追蹤資訊、訊息、相關活動身分識別與事件資訊至特定接聽程式的輸出。

public:
 virtual void TraceTransfer(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, int id, System::String ^ message, Guid relatedActivityId);
public virtual void TraceTransfer (System.Diagnostics.TraceEventCache? eventCache, string source, int id, string? message, Guid relatedActivityId);
public virtual void TraceTransfer (System.Diagnostics.TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void TraceTransfer (System.Diagnostics.TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId);
abstract member TraceTransfer : System.Diagnostics.TraceEventCache * string * int * string * Guid -> unit
override this.TraceTransfer : System.Diagnostics.TraceEventCache * string * int * string * Guid -> unit
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member TraceTransfer : System.Diagnostics.TraceEventCache * string * int * string * Guid -> unit
override this.TraceTransfer : System.Diagnostics.TraceEventCache * string * int * string * Guid -> unit
Public Overridable Sub TraceTransfer (eventCache As TraceEventCache, source As String, id As Integer, message As String, relatedActivityId As Guid)

參數

eventCache
TraceEventCache

TraceEventCache 物件,包含目前處理程序識別碼、執行緒識別碼與堆疊追蹤資訊。

source
String

用來識別輸出的名稱,通常是產生追蹤事件的應用程式名稱。

id
Int32

事件的數值識別項。

message
String

要寫入的訊息。

relatedActivityId
Guid

Guid 物件,識別相關活動。

屬性

備註

重要

此方法並非直接由應用程式程式碼呼叫,而是由 、 TraceTraceSource 類別的成員 Debug 呼叫,以將追蹤資料寫入輸出。

方法 TraceTransfer 用於相關追蹤的相互關聯。 方法 TraceTransferTraceEvent 呼叫 方法來處理呼叫,並將 eventType 層級設定 Transfer 為 ,並將 relatedActivityId Guid 設定為 附加至訊息的字串。

適用於

另請參閱