Class TemplateDiagnostic
- Namespace
- MailStencil
- Assembly
- MailStencil.Core.dll
An engine-independent structured template problem.
public sealed record TemplateDiagnostic : IEquatable<TemplateDiagnostic>
- Inheritance
-
TemplateDiagnostic
- Implements
- Inherited Members
Constructors
TemplateDiagnostic(TemplateComponent, TemplateDiagnosticSeverity, string, string, TemplateSourceSpan?, string?)
An engine-independent structured template problem.
public TemplateDiagnostic(TemplateComponent Component, TemplateDiagnosticSeverity Severity, string Code, string Message, TemplateSourceSpan? Span = null, string? Member = null)
Parameters
ComponentTemplateComponentAffected component, or General for whole-template/model problems.
SeverityTemplateDiagnosticSeverityDiagnostic severity.
CodestringStable machine-readable code.
MessagestringHuman-readable explanation, not a stable identifier.
SpanTemplateSourceSpanSource location when available.
MemberstringRelated variable or member when available.
Properties
Code
Stable machine-readable code.
public string Code { get; init; }
Property Value
Component
Affected component, or General for whole-template/model problems.
public TemplateComponent Component { get; init; }
Property Value
Member
Related variable or member when available.
public string? Member { get; init; }
Property Value
Message
Human-readable explanation, not a stable identifier.
public string Message { get; init; }
Property Value
Severity
Diagnostic severity.
public TemplateDiagnosticSeverity Severity { get; init; }
Property Value
Span
Source location when available.
public TemplateSourceSpan? Span { get; init; }