Struct BufferSnapshot
- Namespace
- SharpConsoleUI.Layout
- Assembly
- SharpConsoleUI.dll
Immutable snapshot of a CharacterBuffer at a point in time.
public readonly record struct BufferSnapshot : IEquatable<BufferSnapshot>
- Implements
- Inherited Members
Constructors
BufferSnapshot(int, int, Cell[,])
Immutable snapshot of a CharacterBuffer at a point in time.
public BufferSnapshot(int Width, int Height, Cell[,] Cells)
Parameters
WidthintThe width of the captured buffer.
HeightintThe height of the captured buffer.
CellsCell[,]The deep copy of all cells in the buffer.
Properties
Cells
The deep copy of all cells in the buffer.
public Cell[,] Cells { get; init; }
Property Value
- Cell[,]
Height
The height of the captured buffer.
public int Height { get; init; }
Property Value
Width
The width of the captured buffer.
public int Width { get; init; }
Property Value
Methods
GetCell(int, int)
Gets the cell at the specified position.
public Cell GetCell(int x, int y)
Parameters
Returns
- Cell
The cell at the specified position.
Exceptions
- ArgumentOutOfRangeException
Thrown when position is out of bounds.