Bari.Console.UI.ConsoleUserInterface.Warning C# (CSharp) Method

Warning() public method

Shows a warning message
public Warning ( string message, string hints = null ) : void
message string The message to be shown
hints string Optional hints about the warning
return void
        public void Warning(string message, string[] hints = null)
        {
            if (!parameters.QuietMode)
            {
                System.Console.ForegroundColor = ConsoleColor.Yellow;
                System.Console.WriteLine(IndentString + "Warning: {0}", message);

                if (hints != null && hints.Length > 0)
                {
                    System.Console.ForegroundColor = ConsoleColor.DarkYellow;
                    System.Console.WriteLine("\n" + IndentString + "Hints:");

                    Indent();
                    foreach (var hint in hints)
                    {
                        System.Console.WriteLine(IndentString + "- {0}", hint);
                    }
                    Unindent();
                }

                System.Console.ForegroundColor = ConsoleColor.Gray;
            }
        }