mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-12-29 20:05:48 +08:00
Change IAnsiConsole to render IRenderable
This makes it possible for encoders to output better representation of the actual objects instead of working with chopped up segments. * IAnsiConsole.Write now takes an IRenderable instead of segments * Calculating cell width does no longer require a render context * Removed RenderContext.LegacyConsole * Removed RenderContext.Encoding * Added Capabilities.Unicode
This commit is contained in:
committed by
Phil Scott
parent
2ba6da3514
commit
20650f1e7e
@@ -5,7 +5,7 @@ namespace Spectre.Console
|
||||
/// <summary>
|
||||
/// Represents console capabilities.
|
||||
/// </summary>
|
||||
public sealed class Capabilities
|
||||
public sealed class Capabilities : IReadOnlyCapabilities
|
||||
{
|
||||
private readonly Profile _profile;
|
||||
|
||||
@@ -19,11 +19,6 @@ namespace Spectre.Console
|
||||
/// Gets or sets a value indicating whether or not
|
||||
/// the console support links.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// There is probably a lot of room for improvement here
|
||||
/// once we have more information about the terminal
|
||||
/// we're running inside.
|
||||
/// </remarks>
|
||||
public bool Links { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -37,8 +32,8 @@ namespace Spectre.Console
|
||||
public bool Legacy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether console output
|
||||
/// has been redirected.
|
||||
/// Gets a value indicating whether or not
|
||||
/// console output has been redirected.
|
||||
/// </summary>
|
||||
public bool Tty
|
||||
{
|
||||
@@ -65,6 +60,12 @@ namespace Spectre.Console
|
||||
/// </summary>
|
||||
public bool Interactive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether
|
||||
/// or not the console supports Unicode.
|
||||
/// </summary>
|
||||
public bool Unicode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Capabilities"/> class.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user