Feb 13, 2014 at 6:22 PM
Edited Feb 13, 2014 at 6:22 PM
Based on my understanding you would like a possible workaround in order to import the
into the ShellViewModel
and properly handle every published event from modules initialization.
One simple way you could achieve this is to remove the publish statements from the
methods, and wait instead until the
initialization process finishes. Therefore, you could override the
method and publish a BootStrapperInitializationCompletedEvent
event when it finishes running base method.
Basically, you would need to perform the following updates from the Modules
- Remove publish statement from each Module initialize() method;
- Add a suscription on each Module initialize() method for the
- Handle the BootStrapperInitializationCompletedEvent event and publish the corresponding
Module event that was previously removed from the initialize() method.
And then, from the BootStrapper
side you should perform the following:
- Override Run() method by implementing the base.Run(); statement and publishing the
would remain as you described, with no changes. This way, the
would publish an event after everything got initialized, giving the green light to every
to publish their events, knowing that the ShellViewModel
is already suscribed to them.
I hope this helped,