Module Is Not Being Called

Topics: Prism v2 - Silverlight 2
Feb 18, 2009 at 3:54 AM
Edited Feb 18, 2009 at 4:03 AM

 

I'm Trying to set up my first composite app. My shell loads with no errors but my module is not being called. What am I missing? 

public
partial class MyAppBootstrapper : UnityBootstrapper

    protected override IModuleCatalog GetModuleCatalog() 
    {
        
var catalog = new ModuleCatalog(); 
        catalog.AddModule(
typeof(RequestModule)); 
        
return catalog; 
    }

    
protected override void ConfigureContainer() 
    {
        Container.RegisterType<
IShellView, Shell>();

 

 

        base.ConfigureContainer();
    }

    
protected override DependencyObject CreateShell() 
    {
        
ShellPresenter presenter = Container.Resolve<ShellPresenter>(); 
        
IShellView view = presenter.View; 
        view.ShowView();
        
return view as DependencyObject
    }

}
 

    
public class RequestModule : IModule 
    {
        
private readonly IUnityContainer _container; 
        
private readonly IRegionManager _regionManager;

 

 

        public RequestModule(IUnityContainer container, IRegionManager regionManager) 
        {
            _container = container;
            _regionManager = regionManager;
        }

 

         

#region IModule Members

 

         

public void Initialize() 
        {
            RegisterViewsAndServices();
            _regionManager.RegisterViewWithRegion(
RegionNames.InformationRegion, () => _container.Resolve<IRequestSummaryViewModel>().View); 
        }

        
protected void RegisterViewsAndServices() 
        {
            _container.RegisterType<
IRequestSummaryView, RequestSummaryView>(); 
            _container.RegisterType<
IRequestSummaryViewModel, RequestSummaryViewModel>(); 
         }

 

         

#endregion
    
}