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
messageobjectThe message to format.
formatterProcessorIMessageFormatterProcessorThe processor used to format nested messages, if any.
formatProviderIFormatProviderThe 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
messageTMessageThe message to format.
formatterProcessorIMessageFormatterProcessorThe processor used to format nested messages, if any.
formatProviderIFormatProviderThe format provider to apply, or null to use the current culture.
Returns
- string
The formatted message.