private async Task ExecuteCommand(CommandLineParameters parameters) { var command = parameters.CreateCommandExecutor(this.io); if (command == null) { this.PrintUnknownCommand(parameters); } bool executed = false; if (command != null) { executed = await command.Execute(); } if (!executed) { command?.DisplayHelp(); } }
private async Task ExecuteCommand(CommandLineParameters parameters) { var command = parameters.CreateCommandExecutor(this.io); if (command == null) { this.PrintUnknownCommand(parameters); } if (command != null) { var executed = await command.Execute(); if (!executed) { this.io.Writer.WriteLine(); command.DisplayHelp(); } } this.io.Writer.WriteLine(); }