Base features

This commit is contained in:
2022-01-06 18:36:25 +01:00
parent 033b280175
commit 7b3584543e
60 changed files with 2576 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
namespace FileTime.ConsoleUI.App.Command
{
public class CommandBinding
{
private readonly Action _commandHandler;
public string Name { get; }
public ConsoleKeyInfo[] Keys { get; }
public Commands Command { get; }
public CommandBinding(string name, Commands command, ConsoleKeyInfo[] keys, Action commandHandler)
{
Name = name;
Command = command;
Keys = keys;
_commandHandler = commandHandler;
}
public void Invoke() => _commandHandler();
}
}