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
: IAnsiConsoleCursorGets the console cursor.
ExclusivityMode
: IExclusivityModeGets the exclusivity mode.
Input
: IAnsiConsoleInputGets the console input.
Pipeline
: RenderPipelineGets the render pipeline.
Profile
: ProfileGets 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.