main
 1using momoney.presentation.model.eventing;
 2using momoney.presentation.presenters;
 3using MoMoney.Presentation.Presenters;
 4using MoMoney.Service.Infrastructure.Eventing;
 5
 6namespace MoMoney.Modules
 7{
 8    public class NavigationModule : INavigationModule
 9    {
10        readonly IEventAggregator broker;
11        readonly IRunPresenterCommand command;
12
13        public NavigationModule(IEventAggregator broker, IRunPresenterCommand command)
14        {
15            this.broker = broker;
16            this.command = command;
17        }
18
19        public void run()
20        {
21            broker.subscribe_to(this);
22        }
23
24        public void notify(NewProjectOpened message)
25        {
26            command.run<INavigationPresenter>();
27        }
28    }
29}