mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-12-29 03:55:48 +08:00
Add support for recording console output
This commit adds support for recording console output as well as exporting it to either text or HTML. A user can also provide their own encoder if they wish.
This commit is contained in:
committed by
Patrik Svensson
parent
b197f278ed
commit
cd0d182f12
@@ -21,10 +21,12 @@ namespace Spectre.Console
|
||||
return console;
|
||||
});
|
||||
|
||||
private static Recorder? _recorder;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the underlying <see cref="IAnsiConsole"/>.
|
||||
/// </summary>
|
||||
public static IAnsiConsole Console => _console.Value;
|
||||
public static IAnsiConsole Console => _recorder ?? _console.Value;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the console's capabilities.
|
||||
|
||||
Reference in New Issue
Block a user