|
#region Using Directives
using LayoutManager.Infrastructure;
using LayoutManager.Modules.Views;
using Microsoft.Practices.Composite.Events;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;
#endregion
namespace LayoutManager.Modules
{
public class ViewsModule : IModule
{
private readonly IUnityContainer _Container;
public ViewsModule(IUnityContainer container)
{
_Container = container;
}
#region IModule Members
public void Initialize()
{
var eventAggregator = _Container.Resolve<IEventAggregator>();
_Container.RegisterInstance<IMenuViewModel>(new MenuViewModel(_Container, eventAggregator, new MenuView()));
_Container.RegisterInstance<IViewA>(new ViewA());
_Container.RegisterInstance<IViewB>(new ViewB());
_Container.RegisterInstance<IViewModelC>(new ViewModelC(new ViewC()));
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm a software developer living in Northampton, UK, and enjoy working with the latest .Net technologies.