Table of Contents

Struct ConsoleCell

Namespace
SharpConsoleUI.Diagnostics.Snapshots
Assembly
SharpConsoleUI.dll

Represents a cell in the console buffer (character + ANSI escape sequence).

public struct ConsoleCell : IEquatable<ConsoleCell>
Implements
Inherited Members
Extension Methods

Constructors

ConsoleCell(char, string)

Creates a new console cell with a char.

public ConsoleCell(char character, string ansiEscape)

Parameters

character char
ansiEscape string

ConsoleCell(Rune, string)

Creates a new console cell with a Rune.

public ConsoleCell(Rune character, string ansiEscape)

Parameters

character Rune
ansiEscape string

Properties

AnsiEscape

Gets or sets the ANSI escape sequence for this cell.

public string AnsiEscape { readonly get; set; }

Property Value

string

Character

Gets or sets the character.

public Rune Character { readonly get; set; }

Property Value

Rune

Methods

Equals(ConsoleCell)

Determines equality.

public bool Equals(ConsoleCell other)

Parameters

other ConsoleCell

Returns

bool

Equals(object?)

Determines equality with object.

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

Gets hash code.

public override int GetHashCode()

Returns

int

ToString()

String representation.

public override string ToString()

Returns

string

Operators

operator ==(ConsoleCell, ConsoleCell)

Equality operator.

public static bool operator ==(ConsoleCell left, ConsoleCell right)

Parameters

left ConsoleCell
right ConsoleCell

Returns

bool

operator !=(ConsoleCell, ConsoleCell)

Inequality operator.

public static bool operator !=(ConsoleCell left, ConsoleCell right)

Parameters

left ConsoleCell
right ConsoleCell

Returns

bool