Class FindingMessage
Findings reach the UI through WPF binding validation, whose error content is a bare string. A level prefix carries the finding's MessageLevel alongside its text: ErrorBorder reads the prefix back to colour its border, and the tooltip strips it. Errors are unprefixed, so any message which does not open with a known prefix reads as an error.
public static class FindingMessage
- Inheritance
-
FindingMessage
- Inherited Members
Methods
Decode(string?)
The text of message, without its level prefix.
public static string Decode(string? message)
Parameters
messagestring
Returns
Encode(MessageLevel, string)
Prefixes message so LevelOf(string?) can recover level.
public static string Encode(MessageLevel level, string message)
Parameters
levelMessageLevelmessagestring
Returns
LevelOf(IEnumerable<ValidationError>)
The most severe level among a control's binding validation errors. Content from any other source - a conversion failure, an application rule - carries no prefix and so reads as Error.
public static MessageLevel LevelOf(IEnumerable<ValidationError> errors)
Parameters
errorsIEnumerable<ValidationError>
Returns
LevelOf(string?)
The level message was encoded with, or Error.
public static MessageLevel LevelOf(string? message)
Parameters
messagestring