Class RenderOutputSnapshot
- Namespace
- SharpConsoleUI.Diagnostics.Snapshots
- Assembly
- SharpConsoleUI.dll
Captures the final console output string sent to Console.Write(). Used to validate actual console output and measure bytes written.
public class RenderOutputSnapshot
- Inheritance
-
RenderOutputSnapshot
- Inherited Members
Properties
BytesWritten
Gets the total number of bytes written.
public int BytesWritten { get; init; }
Property Value
CursorMoves
Gets the number of cursor movement commands.
public int CursorMoves { get; init; }
Property Value
FrameNumber
Gets the frame number this snapshot represents.
public int FrameNumber { get; init; }
Property Value
FullOutput
Gets the full console output string.
public string FullOutput { get; init; }
Property Value
Timestamp
Gets the timestamp when this snapshot was taken.
public DateTime Timestamp { get; init; }
Property Value
Methods
CountPattern(string)
Counts occurrences of a specific ANSI pattern.
public int CountPattern(string pattern)
Parameters
patternstring
Returns
GetAnsiSequences()
Extracts all ANSI escape sequences from the output.
public List<string> GetAnsiSequences()
Returns
GetCursorPositions()
Extracts all cursor positioning commands (ESC[y;xH).
public List<(int y, int x)> GetCursorPositions()
Returns
GetStrippedOutput()
Gets the stripped output (ANSI codes removed).
public string GetStrippedOutput()