diff options
Diffstat (limited to 'src/Notepad/Presentation/Model/Menu/File/Commands/IExitCommand.cs')
| -rw-r--r-- | src/Notepad/Presentation/Model/Menu/File/Commands/IExitCommand.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Model/Menu/File/Commands/IExitCommand.cs b/src/Notepad/Presentation/Model/Menu/File/Commands/IExitCommand.cs new file mode 100644 index 0000000..a78c32b --- /dev/null +++ b/src/Notepad/Presentation/Model/Menu/File/Commands/IExitCommand.cs @@ -0,0 +1,18 @@ +using Notepad.Infrastructure.Core;
+using Notepad.Infrastructure.System;
+
+namespace Notepad.Presentation.Model.Menu.File.Commands {
+ public interface IExitCommand : ICommand {}
+
+ public class ExitCommand : IExitCommand {
+ private readonly IApplicationEnvironment application;
+
+ public ExitCommand(IApplicationEnvironment application) {
+ this.application = application;
+ }
+
+ public void Execute() {
+ application.ShutDown();
+ }
+ }
+}
\ No newline at end of file |
