Table of Contents

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

Width int

The width of the captured buffer.

Height int

The height of the captured buffer.

Cells Cell[,]

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

int

Width

The width of the captured buffer.

public int Width { get; init; }

Property Value

int

Methods

GetCell(int, int)

Gets the cell at the specified position.

public Cell GetCell(int x, int y)

Parameters

x int

The X coordinate.

y int

The Y coordinate.

Returns

Cell

The cell at the specified position.

Exceptions

ArgumentOutOfRangeException

Thrown when position is out of bounds.