mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-30 09:48:03 +01: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
@@ -15,7 +15,7 @@ namespace Spectre.Console
|
||||
/// <param name="format">The exception format options.</param>
|
||||
public static void WriteException(this IAnsiConsole console, Exception exception, ExceptionFormats format = ExceptionFormats.Default)
|
||||
{
|
||||
Render(console, exception.GetRenderable(format));
|
||||
console.Write(exception.GetRenderable(format));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -26,7 +26,7 @@ namespace Spectre.Console
|
||||
/// <param name="settings">The exception settings.</param>
|
||||
public static void WriteException(this IAnsiConsole console, Exception exception, ExceptionSettings settings)
|
||||
{
|
||||
Render(console, exception.GetRenderable(settings));
|
||||
console.Write(exception.GetRenderable(settings));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user