Table of Contents

Method GetMessage

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

GetMessage(object?, IMessageFormatterProcessor?, IFormatProvider?)

Formats a message supplied as object, casting it to TMessage.

public string GetMessage(object? message, IMessageFormatterProcessor? formatterProcessor = null, IFormatProvider? formatProvider = null)

Parameters

message object

The message to format.

formatterProcessor IMessageFormatterProcessor

The processor used to format nested messages, if any.

formatProvider IFormatProvider

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

Returns

string

The formatted message.

GetMessage(TMessage?, IMessageFormatterProcessor?, IFormatProvider?)

Formats a message of type TMessage.

public abstract string GetMessage(TMessage? message, IMessageFormatterProcessor? formatterProcessor = null, IFormatProvider? formatProvider = null)

Parameters

message TMessage

The message to format.

formatterProcessor IMessageFormatterProcessor

The processor used to format nested messages, if any.

formatProvider IFormatProvider

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

Returns

string

The formatted message.