/// <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 WriteLine(string message, params object[] args) { if (Options.Instance.DebugLevels.Contains(DebugLevels.Uncategorized)) { isLastWriteALine = true; ConsoleBase.WriteLineNoHeader(message, args); } }
public void Optional( [Flag("opt", "help", true)] bool optional) { if (!optional) { ConsoleBase.WriteLineNoHeader("OPTIONAL"); } }
public void SampleTable( [Operand("min", "Sets the minimum width the cells can be.")] int minWidth) { ConsoleBase.WriteLine(); ConsoleBase.WriteLineNoHeader(Table.Create() .SetMinimumColumnWidth(minWidth) .AddColumnWithHeader("Device", "Touchpanel", "DSP", "Codec", "Display 1", "Display 2") .AddColumnWithHeader("Status", "Online", "Online", "Offline", "Offline", "Online") .FormatHeaders(ConsoleBase.Colors.BrightYellow, HorizontalAlignment.Center) .FormatColumn(0, ConsoleBase.Colors.BrightCyan, HorizontalAlignment.Right) .ForEachCellInColumn(1, c => c.Color = c.Contents == "Offline" ? ConsoleBase.Colors.BrightRed : ConsoleBase.Colors.BrightGreen).ToString()); }
public void Dump_WithExtended_PrintsCorrect() { var col = new DumpCollection(new string[] { "One", "Two", "Three" }, "Collection"); var chrome = new RoundedChrome(); Formatters.Chrome = chrome; var actual = col.ToString(); ConsoleBase.WriteLineNoHeader(col.ToString()); Formatters.Chrome = new BasicChrome(); Assert.IsTrue(actual.Contains(chrome.BodyTopLeft) && actual.Contains(chrome.BodyLeft) && actual.Contains(chrome.BodyBottomLeft)); }
public void TestTypes( [Operand("bool1", "")] bool b1, [Operand("bool2", "")] bool b2, [Operand("bool3", "")] bool b3, [Operand("bool4", "")] bool b4, [Operand("bool5", "")] bool b5, [Operand("bool6", "")] bool b6, [Operand("int1", "")] int i1, [Operand("int2", "")] ushort i2, [Operand("int3", "")] uint i3, [Operand("int4", "")] double i4, [Operand("int5", "")] long l1 ) { ConsoleBase.WriteLineNoHeader("SUCCESS"); }
/// <summary> /// Always writes a 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 ForceWriteLine(string message, params object[] args) { ConsoleBase.WriteLineNoHeader(message, args); isLastWriteALine = true; }
public void Something3( [Operand("a", "help")] bool value) { ConsoleBase.WriteLineNoHeader("NOTHING3"); }
public void Something2( [Operand("v", "help")] string value, [Operand("w", "help")] string value2) { ConsoleBase.WriteLineNoHeader("NOTHING2"); }
public void Something1( [Operand("v", "help")] string value) { ConsoleBase.WriteLineNoHeader("NOTHING1"); }
public void DoesNothing([Flag("f", "h")] bool a) { ConsoleBase.WriteLineNoHeader("NOTHING"); }