0

I have an event source which derives from EventSource, and an event listener which derives from EventListener.

I call the event listener EnableEvents passing in the EventKeywords parameter, but the listener also gets called for any events with no Keywords.

Is this expected behaviour, and what workaround is there (apart from inventing dummy keywords for all my events?)

Benjol
  • 63,995
  • 54
  • 186
  • 268

1 Answers1

3

Yes, that is expected behavior, that is partially covered here.

You can:

  • Specify keywords for all events.
  • Update your EventListener derived class to handle events w/o keywords, e.g. where they have it set to 0.
  • Use Levels.
  • Thanks, yes I discovered in MSDN that 'None' was more 'no filtering' than 'no keyword'. I went with specifying keywords because I wanted to switch the events off at source, not just ignore them in the listener. – Benjol Feb 01 '16 at 07:22