Record
public record Diagnostic : System.IEquatable<Moka.Docs.Core.Diagnostics.Diagnostic>
Namespace: Moka.Docs.Core.Diagnostics
A single diagnostic message produced during the build.
Inheritance
Implements: System.IEquatable<Moka.Docs.Core.Diagnostics.Diagnostic>
Properties
| Name | Description |
|---|---|
Message |
The diagnostic message. |
Severity |
The severity level. |
Source |
The source file or phase that produced this diagnostic. |
Message
string Diagnostic.Message { get; init; }
The diagnostic message.
Severity
DiagnosticSeverity Diagnostic.Severity { get; init; }
The severity level.
Source
string? Diagnostic.Source { get; init; }
The source file or phase that produced this diagnostic.
Methods
| Name | Description |
|---|---|
ToString() override |
Type Relationships
classDiagram
style Diagnostic fill:#f9f,stroke:#333,stroke-width:2px
Diagnostic ..|> Diagnostic~ : implements
View Source
/// <summary>
/// A single diagnostic message produced during the build.
/// </summary>
public sealed record Diagnostic
{
/// <summary>The severity level.</summary>
public required DiagnosticSeverity Severity { get; init; }
/// <summary>The diagnostic message.</summary>
public required string Message { get; init; }
/// <summary>The source file or phase that produced this diagnostic.</summary>
public string? Source { get; init; }
/// <inheritdoc/>
public override string ToString() => $"[{Severity}] {Message}";
}