Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TraceTransfer Method

EventSchemaTraceListener.TraceTransfer Method

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

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

abstract TraceTransfer : 
        eventCache:TraceEventCache * 
        source:string * 
        id:int * 
        message:string * 
        relatedActivityId:Guid -> unit  
override TraceTransfer : 
        eventCache:TraceEventCache * 
        source:string * 
        id:int * 
        message:string * 
        relatedActivityId:Guid -> unit

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 to correlate 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 it is written. Therefore, a negative id value is written as a large positive integer. The message parameter is written as the Data element. The Guid.ToString(String) method is called to convert the relatedActivityId value to a "B" formatted string, which appears in the header. The Opcode element in the footer identifies the trace event type as a Transfer.

Important noteImportant

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft