/// <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) { if (Crestron.SimplSharp.CrestronEnvironment.ProgramCompatibility == Crestron.SimplSharp.eCrestronSeries.Series3) { ConsoleBase.WriteLine(); } ConsoleBase.WriteNoHeader(Terminal.Formatting.Formatters.FormatObjectForConsole(obj)); }
/// <summary> /// Dumps the specified object to the console. /// </summary> /// <param name="obj">The object to format details about.</param> /// <param name="maxDepth">The maximum number of times to recurse on complex objects. /// <para>A value of 1 would indicate dumping the top-level properties on the object provided, /// while ignoring properties that are complex objects with additional properties of their own.</para> /// <para>A value of 0 indicates no max depth.</para> /// </param> /// <param name="useFullTypeNames"><see langword="true"/> to use an object's fully qualified /// name, otherwise just the short name.</param> /// <typeparam name="T">The type of the object being dumped.</typeparam> /// <returns>The object being dumped.</returns> public static T Dump <T>(this T obj, int maxDepth, bool useFullTypeNames) { if (Crestron.SimplSharp.CrestronEnvironment.ProgramCompatibility == Crestron.SimplSharp.eCrestronSeries.Series3) { ConsoleBase.WriteLine(); } ConsoleBase.WriteNoHeader(Terminal.Formatting.Formatters.FormatObjectForConsole(obj, maxDepth, useFullTypeNames)); return(obj); }
/// <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 ForceWrite(string message, params object[] args) { ConsoleBase.WriteNoHeader(message, args); isLastWriteALine = false; }