From 6967e9b0133504f685e1b8d720c07cda27d684d3 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Thu, 13 May 2021 12:05:25 -0400 Subject: [PATCH] fix: No longer automatically enabling ANSI color, must be enabled by the calling application --- ICD.Common.Utils/AnsiUtils.cs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ICD.Common.Utils/AnsiUtils.cs b/ICD.Common.Utils/AnsiUtils.cs index 11e62ae..60ea292 100644 --- a/ICD.Common.Utils/AnsiUtils.cs +++ b/ICD.Common.Utils/AnsiUtils.cs @@ -70,17 +70,24 @@ namespace ICD.Common.Utils /// public static IDictionary PuttyColors { get { return s_PuttyColors; } } - /// - /// Constructor. - /// - static AnsiUtils() - { #if !SIMPLSHARP - // Enables ANSI color output in windows/linux console + /// + /// Enables ANSI color in the console. + /// + public static void EnableAnsiColor() + { Pastel.ConsoleExtensions.Enable(); -#endif } + /// + /// Disables ANSI color in the console. + /// + public static void DisableAnsiColor() + { + Pastel.ConsoleExtensions.Disable(); + } +#endif + /// /// Removes ANSI control sequences from the string. ///