EventSource.WriteEventWithRelatedActivityIdCore Method (Int32, Guid*, Int32, EventSource.EventData*)
[Supported in the .NET Framework 4.5.1 and later versions]
Writes an event that indicates that the current activity is related to another activity.
Assembly: mscorlib (in mscorlib.dll)
A pointer to the GUID of the related activity ID.
The number of items in the data field.
A pointer to the first item in the event data field.
WriteEventWithRelatedActivityId method but offers better performance, bevcause it does not have to unbox the childActivityID and data arguments.is similar to the
Your ETW event method calling this function must follow these guidelines:
The following C# code example shows how to define a method overload that calls.
<EventSource(Name:="Litware-ProductName-ComponentName")> _ Public NotInheritable Class LitwareComponentNameEventSource Inherits EventSource <[Event](1, Task:=Tasks.Request, Opcode:=EventOpcode.Send)> _ Public Sub RequestStart(relatedActivityId As Guid, reqId As Integer, url As String) WriteEventWithRelatedActivityIdCore(1, relatedActivityId, reqId, url) End Sub End Class
Available since 8
Available since 4.5.1
Portable Class Library
Supported in: portable .NET platforms
Available since 8.1