main
1using gorilla.commons.utility;
2using MoMoney.Presentation.Core;
3using momoney.presentation.model.eventing;
4using MoMoney.Service.Infrastructure.Eventing;
5
6namespace momoney.presentation.presenters
7{
8 public interface IRestartCommand : Command {}
9
10 public class RestartCommand : IRestartCommand
11 {
12 readonly IApplication application;
13 readonly IEventAggregator broker;
14
15 public RestartCommand(IApplication application, IEventAggregator broker)
16 {
17 this.application = application;
18 this.broker = broker;
19 }
20
21 public void run()
22 {
23 broker.publish<ClosingTheApplication>();
24 application.restart();
25 }
26 }
27}