/// <summary> /// Appends the specified text to the last line of text. /// </summary> /// <param name="text"></param> public static void ShowAppendedText(string text, bool addLeadingSpace, bool includeNewLine) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplayAppendedText(text, addLeadingSpace, includeNewLine); }
/// <summary> /// Displays text formatted as JSON. /// </summary> public static void ShowJsonText(string jsonText, int rootIndentLevel, string title, params object[] titleArgs) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplayJsonText(jsonText, rootIndentLevel, title, titleArgs); }
/// <summary> /// Displays the details of an object - either a single object or an enumeration of objects. /// </summary> /// <param name="simpleDataTypesOnly">If set then only displays the values of /// properties or fields which are value types or strings. If cleared then displays the /// details of all properties and fields of the object. /// </param> /// <remarks>If simpleDataTypesOnly is set then properties and fields which are reference /// types will still be listed. However, their members will not be displayed.</remarks> public static void ShowObject(object obj, int rootIndentLevel, bool simpleDataTypesOnly, string title, params object[] titleArgs) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplayObject(obj, rootIndentLevel, simpleDataTypesOnly, title, titleArgs); }
/// <summary> /// Displays the specified text as a numbered paragraph, of the form "n) text", where n /// is the paragraph number. /// </summary> public static void ShowNumberedText(int number, int indentLevel, string text, bool wrapText, params object[] args) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplayNumberedText(number, indentLevel, text, wrapText, args); }
/// <summary> /// Displays the specified text indented by the specified number of tabs. Similar to /// DisplayIndentedText but if the text is of the form "header: text" then the header may /// be formatted differently from the remaining text. /// </summary> public static void ShowHeadedText(int indentLevel, string text, bool wrapText, bool includeNewLine, params object[] args) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplayHeadedText(indentLevel, text, wrapText, includeNewLine, args); }
/// <summary> /// Displays the details of an exception. /// </summary> public static void ShowException(int indentLevel, Exception exception) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplayException(indentLevel, exception); }
/// <summary> /// Displays the values in a data table. /// </summary> public static void ShowDataTable(DataTable dataTable, bool displayRowState) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplayDataTable(dataTable, displayRowState); }
/// <summary> /// Displays the specified text with a single underline. /// </summary> public static void ShowSubTitle(string titleText) { ConsoleDisplayHelper viewer = new ConsoleDisplayHelper(); viewer.DisplaySubTitle(titleText); }