master
1using Notepad.Infrastructure.Core;
2using Notepad.Presentation.Core;
3
4namespace Notepad.Presentation.Presenters.Commands {
5 public interface IRunPresenterCommand<Presenter> : ICommand where Presenter : IPresenter {}
6
7 public class RunPresenterCommand<Presenter> : IRunPresenterCommand<Presenter> where Presenter : IPresenter {
8 private readonly IApplicationController applicationController;
9
10 public RunPresenterCommand(IApplicationController applicationController) {
11 this.applicationController = applicationController;
12 }
13
14 public void Execute() {
15 applicationController.Run<Presenter>();
16 }
17 }
18}