views:

420

answers:

1

Can someone please explain where GetModuleCatalog (Microsoft.Practices.Composite.UnityExtensions.UnityBootstrapper.GetModuleCatalog()) is called in the Prism shell? I understand that it needs to be overridden in the application Bootstrapper, but I could not find out where it is called internally when running the Bootstrapper.

A: 

The ModuleManager calls it when Run() is called from your Bootstrapper. If you look at the implementation of the UnityBootstrapper, you'll see this line of code in the Run() method:

this.InitializeModules();

This method, in turn, does this:

IModuleManager manager;   
manager = this.Container.Resolve<IModuleManager>();        
manager.Run();

So, looking now at the default implementation of IModuleManager (just ModuleManager) you see the modules initialize. If you'd like to peruse the ModuleManager code, you can see it on codeplex here: ModuleManager.cs

Anderson Imes
Thanks for the quick response.
Sure thing. It's good you are diving into the CAL code. It'll definitely help you along the way. I hate feeling like something is magic.
Anderson Imes