Struct TerminalSize
- Namespace
- Tmds.Ssh
- Assembly
- Tmds.Ssh.dll
Represents the size of a terminal.
public readonly struct TerminalSize : IEquatable<TerminalSize>
- Implements
- Inherited Members
Remarks
The size is expressed in characters (Columns and Rows) and, optionally, in pixels (WidthPixels and HeightPixels). Pixel dimensions can be 0 when unspecified.
Constructors
TerminalSize(int, int, int, int)
Initializes a new TerminalSize.
public TerminalSize(int columns, int rows, int widthPixels = 0, int heightPixels = 0)
Parameters
columnsintThe terminal width in characters. Must be greater than 0.
rowsintThe terminal height in characters. Must be greater than 0.
widthPixelsintThe terminal width in pixels. Use 0 when unspecified. Must not be negative.
heightPixelsintThe terminal height in pixels. Use 0 when unspecified. Must not be negative.
Properties
Columns
Gets the terminal width in characters.
public int Columns { get; }
Property Value
HeightPixels
Gets the terminal height in pixels.
public int HeightPixels { get; }
Property Value
Remarks
A value of 0 means the pixel height is unspecified.
Rows
Gets the terminal height in characters.
public int Rows { get; }
Property Value
WidthPixels
Gets the terminal width in pixels.
public int WidthPixels { get; }
Property Value
Remarks
A value of 0 means the pixel width is unspecified.
Methods
Equals(object?)
Determines whether this terminal size equals another object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare.
Returns
Equals(TerminalSize)
Determines whether this terminal size equals another.
public bool Equals(TerminalSize other)
Parameters
otherTerminalSizeThe terminal size to compare.
Returns
GetHashCode()
Returns the hash code for this terminal size.
public override int GetHashCode()
Returns
- int
Hash code.
ToString()
Returns a string representation of the terminal size.
public override string ToString()
Returns
- string
String representation of the terminal size.