main
1using gorilla.commons.utility;
2using MoMoney.Presentation.Core;
3using MoMoney.Service.Infrastructure.Threading;
4
5namespace momoney.presentation.presenters
6{
7 public interface IRunThe<TPresenter> : Command where TPresenter : IPresenter {}
8
9 public class RunThe<TPresenter> : IRunThe<TPresenter> where TPresenter : IPresenter
10 {
11 readonly IApplicationController controller;
12 readonly CommandProcessor processor;
13
14 public RunThe(IApplicationController controller, CommandProcessor processor)
15 {
16 this.controller = controller;
17 this.processor = processor;
18 }
19
20 public void run()
21 {
22 processor.add(() => controller.run<TPresenter>());
23 }
24 }
25}