Method Write
- Namespace
- Ploch.CommandLine.Spectre.Output
- Assembly
- Ploch.CommandLine.Spectre.dll
Write<TMessage>(TMessage, IFormatProvider?)
Writes a message to the console with appropriate formatting based on the message type.
public IOutput Write<TMessage>(TMessage message, IFormatProvider? format = null)
Parameters
messageTMessageThe message to write.
formatIFormatProviderThe format provider to use for formatting, or null to use the current culture.
Returns
- IOutput
The current output instance for method chaining.
Type Parameters
TMessageThe type of the message to write.
Remarks
An Spectre.Console.Rendering.IRenderable is rendered by the console. Anything else, a string and a FormattableString included, is offered to the registered IMessageWriter instances through WriteMessage<TMessage>(TMessage, IFormatProvider?), and only a message no writer accepts is rendered as text here.
Write(IRenderable)
Writes a renderable object to the console.
public IOutput Write(IRenderable renderable)
Parameters
renderableIRenderableThe renderable object to write.
Returns
- IOutput
The current output instance for method chaining.