EventSource::Write<T> Method (String^, EventSourceOptions, T)
Writes an event with the specified name, event data and options.
Assembly: mscorlib (in mscorlib.dll)
public: generic<typename T> void Write( String^ eventName, EventSourceOptions options, T data )
Parameters
- eventName
-
Type:
System::String^
The name of the event.
- options
-
Type:
System.Diagnostics.Tracing::EventSourceOptions
The event options.
- data
-
Type:
T
The event data. This type must be an anonymous type or marked with the EventDataAttribute attribute.
Type Parameters
- T
The type that defines the event and its associated data. This type must be an anonymous type or marked with the EventSourceAttribute attribute.
If eventName is null, the event name is automatically derived from the type T’s event data (Name) or determined based on the name of type T. The public instance properties of data will be written recursively to create the event fields.
Available since 10
.NET Framework
Available since 4.6