public ConsoleColorScope( ConsoleColor consoleColor, ConsoleColor resetColor = ConsoleColor.White) { _resetColor = resetColor.ThrowIfEnumValueIsUndefined(nameof(resetColor)); Console.ForegroundColor = consoleColor.ThrowIfEnumValueIsUndefined(nameof(consoleColor)); }