TerminalRegionAnsiExtensions
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
Extension methods for rendering terminal regions to ANSI escape code format.
csharp
public static class TerminalRegionAnsiExtensionsInheritance
Object → TerminalRegionAnsiExtensions
Methods
ToAnsi(Hex1bTerminalSnapshot, TerminalAnsiOptions?)
Renders the terminal snapshot to an ANSI escape code string, including cursor position.
Parameters:
snapshot(Hex1bTerminalSnapshot): The terminal snapshot to render.options(TerminalAnsiOptions): Optional rendering options.
Returns: String
An ANSI escape code string representation of the terminal snapshot.
csharp
public static string ToAnsi(this Hex1bTerminalSnapshot snapshot, TerminalAnsiOptions? options = null)ToAnsi(IHex1bTerminalRegion, TerminalAnsiOptions?)
Renders the terminal region to an ANSI escape code string. The output represents the region as a series of ANSI sequences that, when printed to a terminal, would display the captured content.
Parameters:
region(IHex1bTerminalRegion): The terminal region to render.options(TerminalAnsiOptions): Optional rendering options.
Returns: String
An ANSI escape code string representation of the terminal region.
csharp
public static string ToAnsi(this IHex1bTerminalRegion region, TerminalAnsiOptions? options = null)