Пример #1
0
 /// <summary>
 /// Writes a debug message to the console, with no additional color formatting applied.
 /// </summary>
 /// <param name="message">The message to write.</param>
 /// <param name="args">Optional arguments to use when formatting the message.</param>
 public static void Write(string message, params object[] args)
 {
     if (Options.Instance.DebugLevels.Contains(DebugLevels.Uncategorized))
     {
         ConsoleBase.Write(message, args);
         isLastWriteALine = false;
     }
 }
Пример #2
0
        public void ValidateWriter_DoesNothing_When_NewValidator_IsNull()
        {
            underTest.WriteErrorMethod = (s) => { ConsoleBase.Write(s); };
            underTest.WriteErrorMethod("temp");
            Assert.IsTrue(testWriter.Contains("temp") && !testWriter.Contains("temp" + ConsoleBase.NewLine));

            underTest.WriteErrorMethod = null;
            underTest.WriteErrorMethod("Error");
            Assert.IsTrue(testWriter.Contains("Error"));
        }
 /// <summary>
 /// Dumps the specified object to the console.
 /// </summary>
 /// <param name="obj">The object to dump to the console.</param>
 public static void Dump(this object obj)
 {
     ConsoleBase.Write(Terminal.Formatting.Formatters.FormatObjectForConsole(obj));
 }