Skip to content

TraceEvent 2.0.19 Public Release

Compare
Choose a tag to compare
@vancem vancem released this 13 Jun 21:08
9e1ea08
  • 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.