TraceListener.TraceTransfer Method

Definition

Writes trace information, a message, a related activity identity and event information to the listener specific output.

C#
public virtual void TraceTransfer(System.Diagnostics.TraceEventCache? eventCache, string source, int id, string? message, Guid relatedActivityId);
C#
public virtual void TraceTransfer(System.Diagnostics.TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId);
C#
[System.Runtime.InteropServices.ComVisible(false)]
public virtual void TraceTransfer(System.Diagnostics.TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId);

Parameters

eventCache
TraceEventCache

A TraceEventCache object that contains the current process ID, thread ID, and stack trace information.

source
String

A name used to identify the output, typically the name of the application that generated the trace event.

id
Int32

A numeric identifier for the event.

message
String

A message to write.

relatedActivityId
Guid

A Guid object identifying a related activity.

Attributes

Remarks

Important

This method is not intended to be called directly by application code but by members of the Debug, Trace, and TraceSource classes to write trace data to output.

The TraceTransfer method is used for the correlation of related traces. The TraceTransfer method calls the TraceEvent method to process the call, with the eventType level set to Transfer and the relatedActivityId Guid as a string appended to the message.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

See also