Table of Contents

Class StringMessageWriter

Namespace
Ploch.CommandLine.Spectre.Output
Assembly
Ploch.CommandLine.Spectre.dll

Writes string messages to the console verbatim.

public class StringMessageWriter : TypeMessageWriter<string>, IMessageWriter<string>, IMessageWriter, IMessageHandler
Inheritance
StringMessageWriter
Implements
Inherited Members

Remarks

This is the writer Write<TMessage>(TMessage, IFormatProvider?) and WriteLine<TMessage>(TMessage) select for a string. It writes the text as-is - a [ is printed, not parsed as a markup tag - so a path or user input passes straight through; Markup(string) is the opt-in to parsing. A consumer that registers its own IMessageWriter<TMessage> for string through AddMessageWriter<TMessageType, TWriter>(IServiceCollection) replaces it.

Constructors

StringMessageWriter(IAnsiConsole)

Writes string messages to the console verbatim.

Methods

Write(string?, IMessageFormatterProcessor?, IFormatProvider?)

Writes the message to the console, substituting an empty string for null.