Table of Contents

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

descriptor ParserDiagnosticDescriptor

Diagnostic descriptor.

message string

Resolved diagnostic message.

ruleName string

Optional rule name context.

exception Exception

Optional related exception.

Properties

Descriptor

Gets the diagnostic descriptor.

public ParserDiagnosticDescriptor Descriptor { get; }

Property Value

ParserDiagnosticDescriptor

Exception

Gets the optional related exception.

public Exception? Exception { get; }

Property Value

Exception

Message

Gets the resolved diagnostic message.

public string Message { get; }

Property Value

string

RuleName

Gets the optional rule name context.

public string? RuleName { get; }

Property Value

string