Constructor StringMessageWriter
- Namespace
- Ploch.CommandLine.Spectre.Output
- Assembly
- Ploch.CommandLine.Spectre.dll
StringMessageWriter(IAnsiConsole)
Writes string messages to the console verbatim.
public StringMessageWriter(IAnsiConsole console)
Parameters
consoleIAnsiConsoleThe console the messages are written to.
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.