Skip to content

MessageFormatter.Format Method ​

Overloads ​

NameDescription
Format<TNode>(Node<TNode>, MessageLevel, MessageFormatterOptions)Lazily enumerates over all Messages of the specified MessageLevel in the specified node.
Format<TNode>(Node<TNode>, MessageFormatterOptions)Lazily enumerates over all Messages in the specified node, grouping by Level in descending order. That is, Error then Warning and then Info.

Format<TNode>(Node<TNode>, MessageLevel, MessageFormatterOptions) ​

Lazily enumerates over all Messages of the specified MessageLevel in the specified node.

c#
public static IEnumerable<string> Format<TNode>(Node<TNode> node, MessageLevel level, MessageFormatterOptions? options = null)
   where TNode : Node<TNode>;

View source

Type Parameters ​

NameDescription
TNodeThe type of the node.

Parameters ​

NameTypeDescription
nodeNode<TNode>The node.
levelMessageLevelThe MessageLevel.
optionsMessageFormatterOptionsThe MessageFormatterOptions to use. If not specified then Default is used.

Returns ​

IEnumerable<String>

A lazy enumeration of formatted Messages.

Format<TNode>(Node<TNode>, MessageFormatterOptions) ​

Lazily enumerates over all Messages in the specified node, grouping by Level in descending order. That is, Error then Warning and then Info.

c#
public static IEnumerable<IGrouping<MessageLevel, string>> Format<TNode>(Node<TNode> node, MessageFormatterOptions? options = null)
   where TNode : Node<TNode>;

View source

Type Parameters ​

NameDescription
TNodeThe type of the node.

Parameters ​

NameTypeDescription
nodeNode<TNode>The node.
optionsMessageFormatterOptionsThe MessageFormatterOptions to use. If not specified then Default is used.

Returns ​

IEnumerable<IGrouping<MessageLevel, String>>

A lazy enumeration of formatted Messages grouped by Level.