Recorder

A console recorder used to record output from a console.

A console recorder used to record output from a console.

Constructors

public Recorder(IAnsiConsole console)

Initializes a new instance of the Recorder class.

Parameters:

console (IAnsiConsole)
The console to record output for.

Properties

Cursor : IAnsiConsoleCursor

Gets the console cursor.

ExclusivityMode : IExclusivityMode

Gets the exclusivity mode.

Input : IAnsiConsoleInput

Gets the console input.

Pipeline : RenderPipeline

Gets the render pipeline.

Profile : Profile

Gets the console profile.

Methods

public void Clear(bool home)

Clears the console.

Parameters:

home (bool)
If the cursor should be moved to the home position.
public void Dispose()
public string Export(IAnsiConsoleEncoder encoder)

Exports the recorded data.

Parameters:

encoder (IAnsiConsoleEncoder)
The encoder.

Returns:

The recorded data represented as a string.

public void Write(IRenderable renderable)

Writes a IRenderable to the console.

Parameters:

renderable (IRenderable)
The IRenderable to write.

Extension Methods

string ExportHtml(this Recorder recorder)

Exports the recorded content as HTML.

Returns:

The recorded content as HTML.

string ExportText(this Recorder recorder)

Exports the recorded content as text.

Returns:

The recorded content as text.