Exemplo n.º 1
0
        private void PrintCommandHelp(string commandName)
        {
            Command command;

            switch (commandName.ToLowerInvariant())
            {
            case "install":
                command = new InstallCommand();
                break;

            case "list":
                command = new ListCommand();
                break;

            case "find":
                command = new FindCommand();
                break;

            default:
                Console.WriteLine($"Unknown command '{commandName}'.{Environment.NewLine}");
                return;
            }

            command.Invoke(new string[] { "--help" });
        }