Patrik Svensson cd0d182f12 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.
2020-09-21 13:33:28 +02:00

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);
}
}