diff options
Diffstat (limited to 'src/Notepad/Presentation/Presenters/Commands/IRunPresenterCommand.cs')
| -rw-r--r-- | src/Notepad/Presentation/Presenters/Commands/IRunPresenterCommand.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Presenters/Commands/IRunPresenterCommand.cs b/src/Notepad/Presentation/Presenters/Commands/IRunPresenterCommand.cs new file mode 100644 index 0000000..9d7458e --- /dev/null +++ b/src/Notepad/Presentation/Presenters/Commands/IRunPresenterCommand.cs @@ -0,0 +1,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>();
+ }
+ }
+}
\ No newline at end of file |
