I am experimenting at the moment with Microsoft EventSources in C#. One restriction is the following
...The number and types of arguments passed to the ETW method must exactly match the types passed to the WriteEvent overload it calls. For example:
[Event(2, Level = EventLevel.Informational)]
public void Info(string message, int count)
{
base.WriteEvent(2, message, count);
}
This basically limits you to writing a more rich API in the EventSource class. This basically means you can not create a method which receives a Custom Object and within the method body you can serialize it to a string (or another type supported by WriteEvent overloads).
The only thing you can decide is the method name and the parameternames and count which mirror an WriteEvent overloads. Or am I wrong?
This is required to build the manifest file. The
_EventSourceUsersGuide.docx
explains it: