Table of Contents

Class ConsoleLine

Namespace
McServerLauncher.Models
Assembly
McServerLauncher.dll

One line in a server's console.

public sealed record ConsoleLine : IEquatable<ConsoleLine>
Inheritance
ConsoleLine
Implements
Inherited Members

Constructors

ConsoleLine(string, ConsoleLineKind)

One line in a server's console.

public ConsoleLine(string Text, ConsoleLineKind Kind)

Parameters

Text string

The line exactly as it was written. Never reformatted.

Kind ConsoleLineKind

What it is about.

Properties

Kind

What it is about.

public ConsoleLineKind Kind { get; init; }

Property Value

ConsoleLineKind

Text

The line exactly as it was written. Never reformatted.

public string Text { get; init; }

Property Value

string

Methods

ToString()

The line's text, so anything that stringifies a line keeps getting a line.

public override string ToString()

Returns

string

Remarks

Not decoration, and not optional. The console's copy — both the context menu and Ctrl+C — goes through o?.ToString() over the selected items. A positional record generates a ToString that prints ConsoleLine { Text = …, Kind = … }, so without this the clipboard would quietly start filling with that instead of the log, compiling cleanly and failing only where nobody would look for it: in whatever the user pasted it into.