XmlWriterTraceListener.TraceTransfer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Writes trace information including the identity of a related activity, a message, and event information to the file or stream.
public:
override void TraceTransfer(System::Diagnostics::TraceEventCache ^ eventCache, System::String ^ source, int id, System::String ^ message, Guid relatedActivityId);
public override void TraceTransfer (System.Diagnostics.TraceEventCache? eventCache, string source, int id, string? message, Guid relatedActivityId);
public override void TraceTransfer (System.Diagnostics.TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId);
override this.TraceTransfer : System.Diagnostics.TraceEventCache * string * int * string * Guid -> unit
Public Overrides Sub TraceTransfer (eventCache As TraceEventCache, source As String, id As Integer, message As String, relatedActivityId As Guid)
Parameters
- eventCache
- TraceEventCache
A TraceEventCache that contains the current process ID, thread ID, and stack trace information.
- source
- String
The source name.
- id
- Int32
A numeric identifier for the event.
- message
- String
A trace message to write.
Remarks
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
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.