Hi,
Based on my understanding you would like a possible workaround in order to import the IModuleManager 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 initialize() methods, and wait instead until the BootStrapper initialization process finishes. Therefore, you could override the Run() method and publish a BootStrapperInitializationCompletedEvent event when it finishes running base method.
Basically, you would need to perform the following updates from the Modules side:
I hope this helped,
Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky
Based on my understanding you would like a possible workaround in order to import the IModuleManager 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 initialize() methods, and wait instead until the BootStrapper initialization process finishes. Therefore, you could override the Run() method and publish a BootStrapperInitializationCompletedEvent event when it finishes running base method.
Basically, you would need to perform the following updates from the Modules side:
- Remove publish statement from each Moduleinitialize() method;
- Add a suscription on each Module initialize() method for the BootStrapperInitializationCompletedEvent event;
-
Handle the BootStrapperInitializationCompletedEvent event and publish the corresponding Module event that was previously removed from the initialize() method.
-
Override Run() method by implementing the base.Run(); statement and publishing the BootStrapperInitializationCompletedEvent event.
I hope this helped,
Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky