diff --git a/CliFx/ApplicationMetadata.cs b/CliFx/ApplicationMetadata.cs index 23d31aa..7727734 100644 --- a/CliFx/ApplicationMetadata.cs +++ b/CliFx/ApplicationMetadata.cs @@ -16,7 +16,7 @@ public string ExecutableName { get; } /// - /// Application version text. + /// Application version. /// public string Version { get; } diff --git a/CliFx/CliApplication.cs b/CliFx/CliApplication.cs index 3451a03..d0be0b9 100644 --- a/CliFx/CliApplication.cs +++ b/CliFx/CliApplication.cs @@ -99,7 +99,7 @@ namespace CliFx // Handle preview directive if (IsPreviewModeEnabled(commandInput)) { - _console.WriteCommandInput(commandInput); + _console.Output.WriteCommandInput(commandInput); return 0; } @@ -125,7 +125,7 @@ namespace CliFx // Handle help option if (ShouldShowHelpText(commandSchema, commandInput)) { - _console.WriteHelpText(helpContext); + _console.Output.WriteHelpText(helpContext); return 0; } @@ -150,12 +150,12 @@ namespace CliFx } catch (CliFxException ex) { - _console.WriteException(ex); + _console.Error.WriteException(ex); if (ex.ShowHelp) { _console.Output.WriteLine(); - _console.WriteHelpText(helpContext); + _console.Output.WriteHelpText(helpContext); } return ex.ExitCode; @@ -200,7 +200,7 @@ namespace CliFx // developer, so we don't swallow them in that case. catch (Exception ex) when (!Debugger.IsAttached) { - _console.WriteException(ex); + _console.Error.WriteException(ex); return 1; } } diff --git a/CliFx/CliApplicationBuilder.cs b/CliFx/CliApplicationBuilder.cs index 96badc2..e1abb47 100644 --- a/CliFx/CliApplicationBuilder.cs +++ b/CliFx/CliApplicationBuilder.cs @@ -37,7 +37,7 @@ namespace CliFx } /// - /// Adds a command the application. + /// Adds a command to the application. /// public CliApplicationBuilder AddCommand() where TCommand : ICommand => AddCommand(typeof(TCommand)); diff --git a/CliFx/Formatting/CommandInputConsoleFormatter.cs b/CliFx/Formatting/CommandInputConsoleFormatter.cs index 00d6291..e4faf04 100644 --- a/CliFx/Formatting/CommandInputConsoleFormatter.cs +++ b/CliFx/Formatting/CommandInputConsoleFormatter.cs @@ -93,7 +93,7 @@ namespace CliFx.Formatting internal static class CommandInputConsoleFormatterExtensions { - public static void WriteCommandInput(this IConsole console, CommandInput commandInput) => - new CommandInputConsoleFormatter(console.Output).WriteCommandInput(commandInput); + public static void WriteCommandInput(this ConsoleWriter consoleWriter, CommandInput commandInput) => + new CommandInputConsoleFormatter(consoleWriter).WriteCommandInput(commandInput); } } \ No newline at end of file diff --git a/CliFx/Formatting/ExceptionConsoleFormatter.cs b/CliFx/Formatting/ExceptionConsoleFormatter.cs index feda0a3..f89b452 100644 --- a/CliFx/Formatting/ExceptionConsoleFormatter.cs +++ b/CliFx/Formatting/ExceptionConsoleFormatter.cs @@ -129,7 +129,7 @@ namespace CliFx.Formatting internal static class ExceptionConsoleFormatterExtensions { - public static void WriteException(this IConsole console, Exception exception) => - new ExceptionConsoleFormatter(console.Error).WriteException(exception); + public static void WriteException(this ConsoleWriter consoleWriter, Exception exception) => + new ExceptionConsoleFormatter(consoleWriter).WriteException(exception); } } \ No newline at end of file diff --git a/CliFx/Formatting/HelpConsoleFormatter.cs b/CliFx/Formatting/HelpConsoleFormatter.cs index ec3b5bb..d691cfc 100644 --- a/CliFx/Formatting/HelpConsoleFormatter.cs +++ b/CliFx/Formatting/HelpConsoleFormatter.cs @@ -443,7 +443,7 @@ namespace CliFx.Formatting internal static class HelpConsoleFormatterExtensions { - public static void WriteHelpText(this IConsole console, HelpContext context) => - new HelpConsoleFormatter(console.Output, context).WriteHelpText(); + public static void WriteHelpText(this ConsoleWriter consoleWriter, HelpContext context) => + new HelpConsoleFormatter(consoleWriter, context).WriteHelpText(); } } \ No newline at end of file