Hex1bTerminalSnapshot
Namespace: Hex1b.Automation
Assembly: Hex1b.dll
An immutable snapshot of terminal state at a point in time. Used for assertions and wait conditions in test sequences.
public sealed class Hex1bTerminalSnapshot : IHex1bTerminalRegion, IDisposableInheritance
Object → Hex1bTerminalSnapshot
Implements
Properties
CellPixelHeight
Height of a terminal character cell in pixels.
Returns: Int32
public int CellPixelHeight { get; }CellPixelWidth
Width of a terminal character cell in pixels.
Returns: Int32
public int CellPixelWidth { get; }CursorX
Cursor X position at snapshot time.
Returns: Int32
public int CursorX { get; }CursorY
Cursor Y position at snapshot time.
Returns: Int32
public int CursorY { get; }Height
Terminal height at snapshot time.
Returns: Int32
public int Height { get; }InAlternateScreen
Whether the terminal was in alternate screen mode at snapshot time.
Returns: Boolean
public bool InAlternateScreen { get; }KgpImages
KGP image data referenced by placements, keyed by image ID.
Returns: IReadOnlyDictionary<UInt32, KgpImageData>
public IReadOnlyDictionary<uint, KgpImageData> KgpImages { get; }KgpPlacements
KGP image placements active at snapshot time.
Returns: IReadOnlyList<KgpPlacement>
public IReadOnlyList<KgpPlacement> KgpPlacements { get; }ScrollbackLineCount
Number of scrollback lines included in this snapshot (prepended above visible content).
Returns: Int32
public int ScrollbackLineCount { get; }Terminal
Reference to the live terminal (for advanced scenarios).
Returns: Hex1bTerminal
public Hex1bTerminal Terminal { get; }Timestamp
When the snapshot was taken.
Returns: DateTimeOffset
public DateTimeOffset Timestamp { get; }Width
Terminal width at snapshot time.
Returns: Int32
public int Width { get; }Methods
ContainsSixelData()
Checks if any cell in the snapshot contains Sixel data.
Returns: Boolean
public bool ContainsSixelData()Dispose()
Releases tracked object references held by this snapshot.
public void Dispose()GetCell(int, int)
Gets the cell at the specified position within this region.
Parameters:
Returns: TerminalCell
The terminal cell, or if out of bounds.
public TerminalCell GetCell(int x, int y)GetRegion(Rect)
Gets a sub-region with localized coordinates.
Parameters:
bounds(Rect): The bounds of the region to extract, relative to this region.
Returns: Hex1bTerminalSnapshotRegion
A region view that translates local coordinates.
public Hex1bTerminalSnapshotRegion GetRegion(Rect bounds)GetScreenText()
Gets the full screen text with all lines separated by newlines.
Returns: String
public string GetScreenText()