Method WriteLine
- Namespace
- Ploch.CommandLine.Spectre.Output
- Assembly
- Ploch.CommandLine.Spectre.dll
WriteLine()
Writes a line terminator to the console.
public IOutput WriteLine()
Returns
- IOutput
The current output instance for method chaining.
WriteLine<TMessage>(TMessage)
Writes a message followed by a line terminator to the console.
public IOutput WriteLine<TMessage>(TMessage message)
Parameters
messageTMessageThe message to write.
Returns
- IOutput
The current output instance for method chaining.
Type Parameters
TMessageThe type of the message to write.
Remarks
Dispatch is delegated to Write<TMessage>(TMessage, IFormatProvider?) so that a message reaching this method sees the same renderable handling and the same registered IMessageWriter instances it would through Write<TMessage>(TMessage, IFormatProvider?). Rendering the message here instead would make a custom registration take effect on one method and not the other.
A terminator is still written unless the writer that rendered the message declares WritesLineTerminator, so a writer that renders inline keeps this method's "followed by a line break" contract.