EventSource.EventData EventSource.EventData EventSource.EventData Struct

Definición

Proporciona los datos de evento para crear sobrecargas rápidas de WriteEvent con el método WriteEventCore(Int32, Int32, EventSource+EventData*).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
Herencia
EventSource.EventDataEventSource.EventDataEventSource.EventData

Comentarios

En el ejemplo siguiente se muestra cómo utilizar EventSource.EventData la estructura.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 EventProvider.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);  
}  

Propiedades

DataPointer DataPointer DataPointer

Obtiene o establece el puntero a los datos de la nueva sobrecarga de WriteEvent.Gets or sets the pointer to the data for the new WriteEvent overload.

Size Size Size

Obtiene o establece el número de elementos de carga en la nueva sobrecarga de WriteEvent.Gets or sets the number of payload items in the new WriteEvent overload.

Se aplica a