Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static class: RT.Util.Consoles.ConsoleUtil

Summary

Console-related utility functions.

Static methods

ConsoleUtil.ConsoleState Determines the state of the standard error stream. The first call determines the state and caches it; subsequent calls return the cached value.
ConsoleUtil.ConsoleState Determines the state of the standard output stream. The first call determines the state and caches it; subsequent calls return the cached value.
int Returns the maximum line width that console applications should use to correctly word-wrap their output. If the output is redirected to a file, this will return an arbitrary but sensible value, otherwise the value reflects the width of the console buffer.
void
Write(ConsoleColoredString value, bool stdErr = false)
Writes the specified ConsoleColoredString to the console.
void
Write(FormattableString value, ConsoleColor? foreground = null, ConsoleColor? background = null, bool stdErr = false)
Writes the specified FormattableString to the console.
void Writes the specified ConsoleColoredString followed by a newline to the console.
void
WriteLine(FormattableString value, ConsoleColor? foreground = null, ConsoleColor? background = null, bool stdErr = false, HorizontalTextAlignment align = HorizontalTextAlignment.Left)
Writes the specified FormattableString to the console.
void
WriteParagraphs(string message, int hangingIndent = 0)
Outputs the specified message to the console window, treating newlines as paragraph breaks. All paragraphs are word-wrapped to fit in the console buffer, or to a sensible width if redirected to a file. Each paragraph is indented by the number of spaces at the start of the corresponding line.
void
WriteParagraphs(EggsNode message, int hangingIndent = 0)
Outputs the specified coloured message, marked up using EggsML, to the console window, treating newlines as paragraph breaks. All paragraphs are word-wrapped to fit in the console buffer, or to a sensible width if redirected to a file. Each paragraph is indented by the number of spaces at the start of the corresponding line. (see also remarks)
void
WriteParagraphs(ConsoleColoredString message, int hangingIndent = 0)
Outputs the specified message to the console window, treating newlines as paragraph breaks. All paragraphs are word-wrapped to fit in the console buffer, or to a sensible width if redirected to a file. Each paragraph is indented by the number of spaces at the start of the corresponding line.
void
WriteStackTrace(IEnumerable<string> stackTraceLines = null)
Writes the specified or current stack trace to the console in pretty colors.

Nested types

Represents the state of a console output stream.