recrownedgtk/RecrownedGTK.Tools/CommandProcessor/Commands/StopCommand.cs
Harrison fa74bc9ae5 Switched to dependency injection for console use.
Created interfaces for input and output for better structure and easier testing.
2020-02-23 20:51:39 -05:00

19 lines
527 B
C#

namespace RecrownedGTK.Tools.CommandProcessor.Commands
{
internal class StopCommand : EngineCommand
{
CommandEngine commandEngine;
public StopCommand(CommandEngine commandEngine) : base("quit", "stop", "q", "exit")
{
this.commandEngine = commandEngine;
help = "Exits the tool.";
}
public override void Run(IUserInput userInput, IUserOutput userOutput, string[] arguments = null)
{
commandEngine.running = false;
}
}
}