Ejemplo n.º 1
0
        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));
Ejemplo n.º 2
0
        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;
        }