public static ConsoleOutputSink Create(bool noColor, bool acceptsVerboseMessages) { var textColorsTheme = TextColorsTheme.GetForCurrentOS(); var(foregroundColor, backgroundColor) = GetForegroundAndBackgroundColor(); var textColors = new TextColors(textColorsTheme, foregroundColor, backgroundColor, noColor); return(new ConsoleOutputSink(textColors, acceptsVerboseMessages));
public ConsoleOutputSink(TextColors textColors, bool acceptsVerboseMessages) { System.Diagnostics.Debug.Assert(textColors != null); this.textColors = textColors ?? new TextColors( TextColorsTheme.GetForCurrentOS(), ConsoleColor.Gray, ConsoleColor.Black, false); this.acceptsVerboseMessages = acceptsVerboseMessages; }