Interface IConsoleMessageWriter
Renders structured console messages. The full form takes a ConsoleMessageBuilder; the convenience methods cover the common "one styled line" cases. Every method returns the writer for chaining.
public interface IConsoleMessageWriter
Methods
Clear()
Clears the console.
IConsoleMessageWriter Clear()
Returns
Error(string, string?)
Writes message as an Error message, optionally titled.
IConsoleMessageWriter Error(string message, string? title = null)
Parameters
Returns
Info(string, string?)
Writes message as an Information message, optionally titled.
IConsoleMessageWriter Info(string message, string? title = null)
Parameters
Returns
Message(MessageKind, string, string?)
Writes message as a message of the given kind, optionally titled.
IConsoleMessageWriter Message(MessageKind kind, string message, string? title = null)
Parameters
kindMessageKindThe message kind, which selects the icon and accent style.
messagestringThe message body.
titlestringAn optional title shown ahead of the body.
Returns
Success(string, string?)
Writes message as a Success message, optionally titled.
IConsoleMessageWriter Success(string message, string? title = null)
Parameters
Returns
Warn(string, string?)
Writes message as a Warning message, optionally titled.
IConsoleMessageWriter Warn(string message, string? title = null)
Parameters
Returns
WriteAssemblyInfo()
Writes the running assembly's name and version line.
IConsoleMessageWriter WriteAssemblyInfo()
Returns
WriteException(Exception)
Renders an exception (type, message, and a shortened stack trace).
IConsoleMessageWriter WriteException(Exception exception)
Parameters
exceptionException
Returns
WriteLegalNotice()
Writes the copyright / legal notice line.
IConsoleMessageWriter WriteLegalNotice()
Returns
WriteLine(string)
Writes a single plain line at Trace — no title, timestamp, or icon.
IConsoleMessageWriter WriteLine(string text)
Parameters
textstringThe line to write.
Returns
WriteMessage(ConsoleMessageBuilder)
Renders a fully built message.
IConsoleMessageWriter WriteMessage(ConsoleMessageBuilder builder)
Parameters
builderConsoleMessageBuilderThe message parts — kind, and any of: title, timestamp, body, verbose, stack trace, placeholder spans.
Returns
WriteSlogan()
Writes the project slogan line.
IConsoleMessageWriter WriteSlogan()