Recorder Class

A console recorder used to record output from a console.
public class Recorder : IAnsiConsole, IDisposable
Namespace
Spectre.Console
Interfaces

Constructors

Recorder(IAnsiConsole)
Initializes a new instance of the Recorder class.

Properties

IAnsiConsoleCursor Cursor
Gets the console cursor.
IExclusivityMode ExclusivityMode
Gets the exclusivity mode.
IAnsiConsoleInput Input
Gets the console input.
RenderPipeline Pipeline
Gets the render pipeline.
Profile Profile
Gets the console profile.

Methods

void Clear(bool)
Clears the console.
void Dispose()
string Export(IAnsiConsoleEncoder)
Exports the recorded data.
void Write(IRenderable)
Writes a IRenderable to the console.

Extension Methods

void AlternateScreen(Action)
Switches to an alternate screen buffer if the terminal supports it.
T Ask<T>(string)
Displays a prompt to the user.
void Clear()
Clears the console.
bool Confirm(string, bool)
Displays a prompt with two choices, yes or no.
Recorder CreateRecorder()
Creates a recorder for the specified console.
string ExportHtml()
Exports the recorded content as HTML.
string ExportText()
Exports the recorded content as text.
LiveDisplay Live(IRenderable)
Creates a new LiveDisplay instance for the console.
void Markup(IFormatProvider, string, object[])
Writes the specified markup to the console.
void Markup(string, object[])
Writes the specified markup to the console.
void Markup(string)
Writes the specified markup to the console.
void MarkupInterpolated(FormattableString)
Writes the specified markup to the console.

All interpolation holes which contain a string are automatically escaped so you must not call EscapeMarkup(string).

void MarkupInterpolated(IFormatProvider, FormattableString)
Writes the specified markup to the console.

All interpolation holes which contain a string are automatically escaped so you must not call EscapeMarkup(string).

void MarkupLine(IFormatProvider, string, object[])
Writes the specified markup, followed by the current line terminator, to the console.
void MarkupLine(string, object[])
Writes the specified markup, followed by the current line terminator, to the console.
void MarkupLine(string)
Writes the specified markup, followed by the current line terminator, to the console.
void MarkupLineInterpolated(FormattableString)
Writes the specified markup, followed by the current line terminator, to the console.

All interpolation holes which contain a string are automatically escaped so you must not call EscapeMarkup(string).

void MarkupLineInterpolated(IFormatProvider, FormattableString)
Writes the specified markup, followed by the current line terminator, to the console.

All interpolation holes which contain a string are automatically escaped so you must not call EscapeMarkup(string).

Progress Progress()
Creates a new Progress(IAnsiConsole) instance for the console.
T Prompt<T>(IPrompt<T>)
Displays a prompt to the user.
void Render(IRenderable)
Renders the specified object to the console.
T RunExclusive<T>(Func<T>)
Runs the specified function in exclusive mode.
Task<T> RunExclusive<T>(Func<Task<T>>)
Runs the specified function in exclusive mode asynchronously.
Status Status()
Creates a new Status(IAnsiConsole) instance for the console.
string ToAnsi(IRenderable)
Gets the VT/ANSI control code sequence for a IRenderable.
void Write(string, Style)
Writes the specified string value to the console.
void Write(string)
Writes the specified string value to the console.
void WriteAnsi(string)
Writes a VT/Ansi control code sequence to the console (if supported).
void WriteException(Exception, ExceptionFormats)
Writes an exception to the console.
void WriteException(Exception, ExceptionSettings)
Writes an exception to the console.
void WriteLine(string, Style)
Writes the specified string value, followed by the current line terminator, to the console.
void WriteLine(string)
Writes the specified string value, followed by the current line terminator, to the console.
void WriteLine()
Writes an empty line to the console.