Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

EventSource.EventData Struct

Definition

Namespace:
System.Diagnostics.Tracing
Assemblies:
mscorlib.dll, System.Diagnostics.Tracing.dll
Assemblies:
netstandard.dll, System.Diagnostics.Tracing.dll
Assembly:
System.Diagnostics.Tracing.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll
Source:
EventSource.cs
Source:
EventSource.cs
Source:
EventSource.cs
Source:
EventSource.cs
Source:
EventSource.cs

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.

Provides the event data for creating fast WriteEvent overloads by using the WriteEventCore(Int32, Int32, EventSource+EventData*) method.

public protected value class EventSource::EventData
protected internal struct EventSource.EventData
Protected Friend Structure EventSource.EventData
Inheritance
EventSource.EventData

Remarks

The following example shows how to use the EventSource.EventData structure.

[NonEvent] 
public unsafe void WriteEvent(int eventId, int arg1, int arg2, int arg3, int arg4) { 
 EventData* dataDesc = stackalloc EventSource.EventData[4]; 

 dataDesc[0].DataPointer = (IntPtr)(&arg1); 
 dataDesc[0].Size = 4; 
 dataDesc[1].DataPointer = (IntPtr)(&arg2); 
 dataDesc[1].Size = 4; 
 dataDesc[2].DataPointer = (IntPtr)(&arg3); 
 dataDesc[2].Size = 4; 
 dataDesc[3].DataPointer = (IntPtr)(&arg4); 
 dataDesc[3].Size = 4; 

 WriteEventCore(eventId, 4, (IntPtr)dataDesc); 
} 

Properties

Name Description
DataPointer

Gets or sets the pointer to the data for the new WriteEvent overload.

Size

Gets or sets the number of payload items in the new WriteEvent overload.

Applies to


Feedback

Was this page helpful?