Question

Is there any way of looking at all the subscriptions contained within the EventAggregator for all Events?

Theres only a .GetEvent method off the EventAggregator ... but I'd just like to see all subscriptions that are contained within it ... without having to go each Event in turn.

Thanks

Was it helpful?

Solution

The out-of-the-box implementation does not provide a means for you to obtain all events. Therefore, if you want this you'll need to either:

  • resort to nasty reflection to pull the dictionary of events out of your EventAggregator
  • supplement the IEventAggregator with another property that yields all events. You can't use inheritance to add this because the dictionary of events is declared private, not protected
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top