TraceEvent 2.0.19 Public Release
- Added support for the 'dynamic' keyword to fetch fields from a TraceEvent. (See #630)
Instead of doing
F(TraceEvent myEvent) {
Console.WriteLine("MyField = {0}", myEvent.PayloadByName("MyField"));
}
You can do
F(TraceEvent myEvent) {
dynamic dEvent = (dynamic) myEvent;
Console.WriteLine("MyField = {0}", dEvent.MyField);
}
It is not any faster, bit it is a bit more convenient.