Class DiagnosticDetails
- Namespace
- Utils.Parser.Diagnostics
- Assembly
- Utils.Parser.Diagnostics.dll
Represents immutable content for a parser diagnostic.
public sealed record DiagnosticDetails : IEquatable<DiagnosticDetails>
- Inheritance
-
DiagnosticDetails
- Implements
- Inherited Members
- Extension Methods
Constructors
DiagnosticDetails(ParserDiagnosticDescriptor, string, string?, Exception?)
Initializes a new instance of the DiagnosticDetails record.
public DiagnosticDetails(ParserDiagnosticDescriptor descriptor, string message, string? ruleName = null, Exception? exception = null)
Parameters
descriptorParserDiagnosticDescriptorDiagnostic descriptor.
messagestringResolved diagnostic message.
ruleNamestringOptional rule name context.
exceptionExceptionOptional related exception.
Properties
Descriptor
Gets the diagnostic descriptor.
public ParserDiagnosticDescriptor Descriptor { get; }
Property Value
Exception
Gets the optional related exception.
public Exception? Exception { get; }
Property Value
Message
Gets the resolved diagnostic message.
public string Message { get; }
Property Value
RuleName
Gets the optional rule name context.
public string? RuleName { get; }