Class AnsiLinesSnapshot
- Namespace
- SharpConsoleUI.Diagnostics.Snapshots
- Assembly
- SharpConsoleUI.dll
Captures the ANSI-encoded output lines from CharacterBuffer.ToLines(). Used to validate ANSI generation and optimization.
public class AnsiLinesSnapshot
- Inheritance
-
AnsiLinesSnapshot
- Inherited Members
Properties
FrameNumber
Gets the frame number this snapshot represents.
public int FrameNumber { get; init; }
Property Value
Lines
Gets the list of ANSI-encoded lines.
public List<string> Lines { get; init; }
Property Value
Timestamp
Gets the timestamp when this snapshot was taken.
public DateTime Timestamp { get; init; }
Property Value
TotalAnsiEscapes
Gets the total number of ANSI escape sequences across all lines.
public int TotalAnsiEscapes { get; init; }
Property Value
TotalCharacters
Gets the total number of visible characters (excluding ANSI codes).
public int TotalCharacters { get; init; }
Property Value
Methods
CountEscapeSequences(string)
Counts ANSI escape sequences matching a specific pattern.
public int CountEscapeSequences(string pattern)
Parameters
patternstring
Returns
GetAllEscapeSequences()
Returns all ANSI escape sequences in the output.
public List<string> GetAllEscapeSequences()
Returns
GetLine(int)
Gets the line at the specified index.
public string GetLine(int y)
Parameters
yint
Returns
ParseLine(int)
Parses a line into segments of text and ANSI codes.
public List<AnsiSegment> ParseLine(int y)
Parameters
yint