Table of Contents

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

message TMessage

The message to write.

format IFormatProvider

The format provider to use for formatting, or null to use the current culture.

Returns

IOutput

The current output instance for method chaining.

Type Parameters

TMessage

The 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

renderable IRenderable

The renderable object to write.

Returns

IOutput

The current output instance for method chaining.