Skip to content

TerminalRegionAnsiExtensions ​

Namespace: Hex1b.Automation

Assembly: Hex1b.dll

Extension methods for rendering terminal regions to ANSI escape code format.

csharp
public static class TerminalRegionAnsiExtensions

Inheritance ​

Object → TerminalRegionAnsiExtensions

Methods ​

ToAnsi(Hex1bTerminalSnapshot, TerminalAnsiOptions?) ​

Renders the terminal snapshot to an ANSI escape code string, including cursor position.

Parameters:

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:

Returns: String

An ANSI escape code string representation of the terminal region.

csharp
public static string ToAnsi(this IHex1bTerminalRegion region, TerminalAnsiOptions? options = null)

Released under the MIT License.