문제

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

도움이 되었습니까?

해결책

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top