This documentation is archived and is not being maintained.

XmlWriterTraceListener.TraceTransfer Method

Writes trace information including the identity of a related activity, a message, and event information to the file or stream.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

public override void TraceTransfer(
	TraceEventCache eventCache,
	string source,
	int id,
	string message,
	Guid relatedActivityId
)

Parameters

eventCache
Type: System.Diagnostics.TraceEventCache
A TraceEventCache that contains the current process ID, thread ID, and stack trace information.
source
Type: System.String
The source name.
id
Type: System.Int32
A numeric identifier for the event.
message
Type: System.String
A trace message to write.
relatedActivityId
Type: System.Guid
A Guid structure that identifies a related activity.

The TraceTransfer method is used for the correlation of related traces. The eventCache, source, id, and relatedActivityId parameters are used in the header and footer of the trace. The id parameter is converted to an unsigned integer before writing, so a negative id value is written as a large positive integer. The message parameter is written as the Message element. The Guid.ToString(String) method is called to convert the relatedActivityId value to a "B" formatted string, which appears in the header. The SubTypeName element in the footer identifies the trace event type as a Transfer.

Important noteImportant

The TraceTransfer method is not intended to be called by application code. It is intended to be called by a TraceSource object to emit the trace information for its TraceTransfer method.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: