Table of Contents

Class DiagnosticMessage

Namespace
MoonBark.GridPlacement.Core.Types
Assembly
MoonBark.GridPlacement.Core.dll

Strongly-typed diagnostic message with severity and optional code.

public record DiagnosticMessage : IEquatable<DiagnosticMessage>
Inheritance
DiagnosticMessage
Implements
Inherited Members

Constructors

DiagnosticMessage(string, DiagnosticSeverity, string?)

Strongly-typed diagnostic message with severity and optional code.

public DiagnosticMessage(string Text, DiagnosticSeverity Severity, string? Code = null)

Parameters

Text string
Severity DiagnosticSeverity
Code string

Properties

Code

public string? Code { get; init; }

Property Value

string

Severity

public DiagnosticSeverity Severity { get; init; }

Property Value

DiagnosticSeverity

Text

public string Text { get; init; }

Property Value

string

Methods

Critical(string, string?)

Creates a critical diagnostic message.

public static DiagnosticMessage Critical(string text, string? code = null)

Parameters

text string
code string

Returns

DiagnosticMessage

Error(string, string?)

Creates an error diagnostic message.

public static DiagnosticMessage Error(string text, string? code = null)

Parameters

text string
code string

Returns

DiagnosticMessage

Info(string, string?)

Creates an informational diagnostic message.

public static DiagnosticMessage Info(string text, string? code = null)

Parameters

text string
code string

Returns

DiagnosticMessage

Warning(string, string?)

Creates a warning diagnostic message.

public static DiagnosticMessage Warning(string text, string? code = null)

Parameters

text string
code string

Returns

DiagnosticMessage