Table of Contents

Method GetMessage

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

GetMessage(object?, IMessageFormatterProcessor?, IFormatProvider?)

Formats a message object into its string representation.

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

Parameters

message object

The message object to format. Can be null.

formatterProcessor IMessageFormatterProcessor

The processor that provides formatting capabilities. Can be null.

formatProvider IFormatProvider

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

Returns

string

A string representation of the provided message.

GetMessage(TMessage?, IMessageFormatterProcessor?, IFormatProvider?)

Formats a strongly-typed message into its string representation.

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

Parameters

message TMessage

The strongly-typed message to format. Can be null.

formatterProcessor IMessageFormatterProcessor

The processor that provides formatting capabilities. Can be null.

formatProvider IFormatProvider

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

Returns

string

A string representation of the provided message.