-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daa9770
commit f9a2034
Showing
5 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...d-plus-plus-file-management/terminal/notepad-plus-plus-file-management/CommandSwitcher.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using notepad_plus_plus_file_management.Interfaces; | ||
|
||
namespace notepad_plus_plus_file_management | ||
{ | ||
public class CommandSwitcher( | ||
ICommandLineArgs commandLineArgs, | ||
IProcessManager processManager | ||
) : ICommandSwitcher | ||
{ | ||
private readonly ICommandLineArgs commandLineArgs = commandLineArgs; | ||
private readonly IProcessManager processManager = processManager; | ||
|
||
public string GetCommand() | ||
{ | ||
string command = commandLineArgs.GetByKey("--command"); | ||
return command; | ||
} | ||
|
||
public void Run() | ||
{ | ||
if (GetCommand() == "open") | ||
{ | ||
processManager.Run(); | ||
} | ||
} | ||
} | ||
|
||
public interface ICommandSwitcher | ||
{ | ||
public string GetCommand(); | ||
public void Run(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters