summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Presenters/Commands/IRunPresenterCommand.cs
blob: 9d7458e5493180574263b095cde7fc9a9761471b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using Notepad.Infrastructure.Core;
using Notepad.Presentation.Core;

namespace Notepad.Presentation.Presenters.Commands {
    public interface IRunPresenterCommand<Presenter> : ICommand where Presenter : IPresenter {}

    public class RunPresenterCommand<Presenter> : IRunPresenterCommand<Presenter> where Presenter : IPresenter {
        private readonly IApplicationController applicationController;

        public RunPresenterCommand(IApplicationController applicationController) {
            this.applicationController = applicationController;
        }

        public void Execute() {
            applicationController.Run<Presenter>();
        }
    }
}