Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: EventAggregator gets replaced in multiple shell application

$
0
0
In an application I create a primary shell in the usual way using a bootstrapper that calls ConfigureModuleCatalog, CreateShell and InitializeShell in this order. Works fine.
In order to display a new window with detailed information on a patient selected in one of the primary shell's Views a new PatientBootstrapper gets executed that creates a new Shell. It also includes the ConfigureModuleCatalog, CreateShell and InitializeShell sequence.
During this process a Presenter associated with a View registered in this new shell subscribes to an Event using an IEventAggregator injected in its constructor (through the Unity framework). At a later stage that Event is fired from the primary Shell's content, also using an injected IEventAggregator.
It turn's out that both IEventAggregators are different, judging from the Events registered in them. One is associated with the primary Shell, the other with the new Shell. As a result there is no follow-up to the fired event.
Questions:
  1. Where and when is the second IEventAggregator constructed?
  2. How do I force a common IEventAggregator in all created Shells?

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>