Table of Contents

Class NcDiagnostic

Namespace
Hi.NcParsers
Assembly
HiMech.dll

A structured diagnostic from the SoftNcRunner pipeline, designed for IProgress<T> consumption.

Id is composed as {Primary}-{Secondary}--{Abbrev} (e.g., Cycle-Peck--BadPeckQ, Syntax-Build--Exception). For irregular cases that don't fit the pattern, use a custom string.

public class NcDiagnostic
Inheritance
NcDiagnostic
Inherited Members
Extension Methods

Constructors

NcDiagnostic(NcDiagnosticSeverity, NcDiagnosticCategory, string, string, object, Sentence)

public NcDiagnostic(NcDiagnosticSeverity severity, NcDiagnosticCategory category, string id, string text, object detail = null, Sentence sentence = null)

Parameters

severity NcDiagnosticSeverity
category NcDiagnosticCategory
id string
text string
detail object
sentence Sentence

Properties

Category

Diagnostic category.

public NcDiagnosticCategory Category { get; }

Property Value

NcDiagnosticCategory

Detail

Optional detail data or exception. Null if not applicable.

public object Detail { get; }

Property Value

object

Id

Structured diagnostic ID for filtering and suppression. Normally {Primary}-{Secondary}–{Serial:000}.

public string Id { get; }

Property Value

string

Sentence

The NC source block that triggered this diagnostic. Null for pipeline-level messages (e.g., lifecycle start/done).

public Sentence Sentence { get; }

Property Value

Sentence

Severity

Importance level.

public NcDiagnosticSeverity Severity { get; }

Property Value

NcDiagnosticSeverity

Text

End-user friendly message text.

public string Text { get; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.