Class Diagnostic
Describes a compiler-style diagnostic with an inline header, an optional inline message, and optional block details.
public sealed class Diagnostic : Block
- Inheritance
-
Diagnostic
- Inherited Members
Constructors
Diagnostic(Inline, string, Color, Inline, Inline, Block)
Creates a compiler-style diagnostic.
public Diagnostic(Inline origin, string kind, Color themeColor, Inline title, Inline message, Block details)
Parameters
originInlineThe diagnostic origin, such as a source location.
kindstringThe diagnostic kind label.
themeColorColorThe diagnostic theme color.
titleInlineThe diagnostic title.
messageInlineThe diagnostic message.
detailsBlockAdditional block details for the diagnostic.
Properties
Details
Gets additional block details for the diagnostic.
public Block Details { get; }
Property Value
Kind
Gets the diagnostic kind label.
public string Kind { get; }
Property Value
Message
Gets the diagnostic message.
public Inline Message { get; }
Property Value
Origin
Gets the diagnostic origin, such as a source location.
public Inline Origin { get; }
Property Value
ThemeColor
Gets the diagnostic theme color.
public Color ThemeColor { get; }
Property Value
Title
Gets the diagnostic title.
public Inline Title { get; }
Property Value
Methods
FromSeverity(Severity, Inline, Inline, Inline, Block)
Creates a diagnostic from a severity level.
public static Diagnostic FromSeverity(Severity severity, Inline origin, Inline title, Inline message, Block details)
Parameters
severitySeverityThe diagnostic severity.
originInlineThe diagnostic origin, such as a source location.
titleInlineThe diagnostic title.
messageInlineThe diagnostic message.
detailsBlockAdditional block details for the diagnostic.
Returns
- Diagnostic
A diagnostic configured for the given severity.