Does it has any sense to use two instance of EventAggregator - every to handle different events from diffrent areas of system ? Or it doesn't matter and for subscribe any type of event and publish any type of event (even if the events are not connected from bussines point of view) using just single and the same instance of EventAggregator is ok?
0
votes
1 Answers
0
votes
Having a scoped EventAggregator
in a sense defeats its purpose, being to enable anyone to subscribe to any event.
That being said, your application might well benefit from scoped events, though. In that case, I'd put the events in different shared assemblies visible to different parts of your application (e.g. tiers). Think UserLoggedInEvent
available to all ui modules, but not the database module, as opposed to a ui EventAggregator
and another one for the database.