summaryrefslogtreecommitdiff
path: root/product/Presentation/Presenters/RunPresenterCommand.cs
blob: 7e5fe1e4eacd8c665ecd158a09e053c7d9f1331c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using MoMoney.Presentation.Core;
using MoMoney.Service.Infrastructure.Threading;

namespace MoMoney.Presentation.Presenters
{
    public class RunPresenterCommand : IRunPresenterCommand
    {
        readonly IApplicationController application_controller;
        readonly CommandProcessor processor;

        public RunPresenterCommand(IApplicationController application_controller, CommandProcessor processor)
        {
            this.application_controller = application_controller;
            this.processor = processor;
        }

        public void run<Presenter>() where Presenter : IPresenter
        {
            processor.add(() => application_controller.run<Presenter>());
        }
    }
}