blob: bb25ce4d15062e274a608d16f502d8b1b7ba7a12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
using Gorilla.Commons.Utility.Core;
using MoMoney.Presentation.Core;
using MoMoney.Service.Infrastructure.Threading;
namespace MoMoney.Presentation.Presenters
{
public interface IRunThe<TPresenter> : ICommand where TPresenter : IPresenter
{
}
public class RunThe<TPresenter> : IRunThe<TPresenter> where TPresenter : IPresenter
{
readonly IApplicationController controller;
readonly ICommandProcessor processor;
public RunThe(IApplicationController controller, ICommandProcessor processor)
{
this.controller = controller;
this.processor = processor;
}
public void run()
{
processor.add(() => controller.run<TPresenter>());
}
}
}
|