mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-24 20:22:51 +08:00

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.
38 lines
925 B
C#
38 lines
925 B
C#
using System.Text;
|
|
using Spectre.Console.Rendering;
|
|
|
|
namespace Spectre.Console
|
|
{
|
|
/// <summary>
|
|
/// Represents a console.
|
|
/// </summary>
|
|
public interface IAnsiConsole
|
|
{
|
|
/// <summary>
|
|
/// Gets the console's capabilities.
|
|
/// </summary>
|
|
Capabilities Capabilities { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the console output encoding.
|
|
/// </summary>
|
|
Encoding Encoding { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the buffer width of the console.
|
|
/// </summary>
|
|
int Width { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the buffer height of the console.
|
|
/// </summary>
|
|
int Height { get; }
|
|
|
|
/// <summary>
|
|
/// Writes a string followed by a line terminator to the console.
|
|
/// </summary>
|
|
/// <param name="segment">The segment to write.</param>
|
|
void Write(Segment segment);
|
|
}
|
|
}
|