This repository has been archived on 2026-10-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
HiNC-2025-win-desktop-Deploy/App/wwwroot/HiAPI-docsite/api/Hi.NcParsers.NcDiagnostic.html
T

995 lines
34 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class NcDiagnostic | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class NcDiagnostic | HiAPI-C# 2025 ">
<meta name="description" content="A structured diagnostic from the pipeline, designed for consumption. Implements so it shares the common message channel with , step diagnostics, and progress fractions, while additionally carrying an NC-source anchor that non-NC messages do not have. Also an itself — and delegate to so a diagnostic can be used directly anywhere a carrier is expected, without the consumer unwrapping the inner anchor. is composed as {Primary}-{Secondary}--{Abbrev} (e.g., Cycle-Peck--BadPeckQ, Syntax-Build--Exception). For irregular cases that don&#39;t fit the pattern, use a custom string.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.NcDiagnostic">
<h1 id="Hi_NcParsers_NcDiagnostic" data-uid="Hi.NcParsers.NcDiagnostic" class="text-break">
Class NcDiagnostic
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>A structured diagnostic from the <a class="xref" href="Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> pipeline,
designed for <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress&lt;T&gt;</a> consumption. Implements
<a class="xref" href="Hi.Common.Messages.IMessage.html">IMessage</a> so it shares the common message channel with
<a class="xref" href="Hi.Common.Messages.SimpleMessage.html">SimpleMessage</a>, step diagnostics, and progress fractions, while
additionally carrying an NC-source <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_SentenceCarrier">SentenceCarrier</a> anchor that
non-NC messages do not have.</p>
<p>
Also an <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a> itself — <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_GetSentence">GetSentence()</a> and
<a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_SentenceIndex">SentenceIndex</a> delegate to <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_SentenceCarrier">SentenceCarrier</a> so a
diagnostic can be used directly anywhere a carrier is expected, without the
consumer unwrapping the inner anchor.
</p>
<p>
<a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Id">Id</a> is composed as <code>{Primary}-{Secondary}--{Abbrev}</code>
(e.g., <code>Cycle-Peck--BadPeckQ</code>, <code>Syntax-Build--Exception</code>).
For irregular cases that don't fit the pattern, use a custom string.
</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class NcDiagnostic : IMessage, ISentenceCarrier, IGetSentence, ISentenceIndexed</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">NcDiagnostic</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="Hi.Common.Messages.IMessage.html">IMessage</a></div>
<div><a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></div>
<div><a class="xref" href="Hi.NcParsers.IGetSentence.html">IGetSentence</a></div>
<div><a class="xref" href="Hi.NcParsers.ISentenceIndexed.html">ISentenceIndexed</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_NcParsers_NcDiagnostic__ctor_" data-uid="Hi.NcParsers.NcDiagnostic.#ctor*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic__ctor_Hi_Common_Messages_Severity_Hi_Common_Messages_Category_System_String_System_FormattableString_System_Object_Hi_NcParsers_ISentenceCarrier_" data-uid="Hi.NcParsers.NcDiagnostic.#ctor(Hi.Common.Messages.Severity,Hi.Common.Messages.Category,System.String,System.FormattableString,System.Object,Hi.NcParsers.ISentenceCarrier)">
NcDiagnostic(Severity, Category, string, FormattableString, object, ISentenceCarrier)
</h3>
<div class="markdown level1 summary"><p>Creates a templated <a class="xref" href="Hi.NcParsers.NcDiagnostic.html">NcDiagnostic</a>: the interpolated template and its values
are kept on <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Format">Format</a> / <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Args">Args</a> and <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Notification">Notification</a>
becomes the culture-invariant English rendering. An interpolated string literal passed to
the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> constructor is NOT captured here — call sites opt in through the
<code>*Fmt</code> methods on <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public NcDiagnostic(Severity severity, Category category, string id, FormattableString notification, object detail = null, ISentenceCarrier sentenceCarrier = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>severity</code> <a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a></dt>
<dd><p>Importance level — see <a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a>.</p>
</dd>
<dt><code>category</code> <a class="xref" href="Hi.Common.Messages.Category.html">Category</a></dt>
<dd><p>Diagnostic category — see <a class="xref" href="Hi.Common.Messages.Category.html">Category</a>.</p>
</dd>
<dt><code>id</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Structured diagnostic ID (see <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Id">Id</a>).</p>
</dd>
<dt><code>notification</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.formattablestring">FormattableString</a></dt>
<dd><p>Interpolated notification template.</p>
</dd>
<dt><code>detail</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>Optional detail data or exception. Null if not applicable.</p>
</dd>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd><p>Carrier for the NC source block that triggered this diagnostic; null for pipeline-level messages.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic__ctor_" data-uid="Hi.NcParsers.NcDiagnostic.#ctor*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic__ctor_Hi_Common_Messages_Severity_Hi_Common_Messages_Category_System_String_System_String_System_Object_Hi_NcParsers_ISentenceCarrier_" data-uid="Hi.NcParsers.NcDiagnostic.#ctor(Hi.Common.Messages.Severity,Hi.Common.Messages.Category,System.String,System.String,System.Object,Hi.NcParsers.ISentenceCarrier)">
NcDiagnostic(Severity, Category, string, string, object, ISentenceCarrier)
</h3>
<div class="markdown level1 summary"><p>Creates a fully-populated <a class="xref" href="Hi.NcParsers.NcDiagnostic.html">NcDiagnostic</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public NcDiagnostic(Severity severity, Category category, string id, string notification, object detail = null, ISentenceCarrier sentenceCarrier = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>severity</code> <a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a></dt>
<dd><p>Importance level — see <a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a>.</p>
</dd>
<dt><code>category</code> <a class="xref" href="Hi.Common.Messages.Category.html">Category</a></dt>
<dd><p>Diagnostic category — see <a class="xref" href="Hi.Common.Messages.Category.html">Category</a>.</p>
</dd>
<dt><code>id</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Structured diagnostic ID (see <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Id">Id</a>).</p>
</dd>
<dt><code>notification</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>End-user friendly notification text.</p>
</dd>
<dt><code>detail</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>Optional detail data or exception. Null if not applicable.</p>
</dd>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd><p>Carrier for the NC source block that triggered this diagnostic; null for pipeline-level messages.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic__ctor_" data-uid="Hi.NcParsers.NcDiagnostic.#ctor*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic__ctor_Hi_Common_Messages_Severity_Hi_Common_Messages_Category_System_String_System_String_System_String_System_Object___System_Object_Hi_NcParsers_ISentenceCarrier_" data-uid="Hi.NcParsers.NcDiagnostic.#ctor(Hi.Common.Messages.Severity,Hi.Common.Messages.Category,System.String,System.String,System.String,System.Object[],System.Object,Hi.NcParsers.ISentenceCarrier)">
NcDiagnostic(Severity, Category, string, string, string, object[], object, ISentenceCarrier)
</h3>
<div class="markdown level1 summary"><p>Creates an <a class="xref" href="Hi.NcParsers.NcDiagnostic.html">NcDiagnostic</a> carrying an already-split template — used when
re-wrapping another <a class="xref" href="Hi.Common.Messages.IMessage.html">IMessage</a> whose format / args must survive (e.g.
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_AsMessageSink_Hi_NcParsers_ISentenceCarrier_">AsMessageSink(ISentenceCarrier)</a>) instead of re-interpolating.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public NcDiagnostic(Severity severity, Category category, string id, string notification, string format, object[] args, object detail = null, ISentenceCarrier sentenceCarrier = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>severity</code> <a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a></dt>
<dd><p>Importance level — see <a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a>.</p>
</dd>
<dt><code>category</code> <a class="xref" href="Hi.Common.Messages.Category.html">Category</a></dt>
<dd><p>Diagnostic category — see <a class="xref" href="Hi.Common.Messages.Category.html">Category</a>.</p>
</dd>
<dt><code>id</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Structured diagnostic ID (see <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Id">Id</a>).</p>
</dd>
<dt><code>notification</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Already-rendered notification text.</p>
</dd>
<dt><code>format</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Composite-format template behind <code class="paramref">notification</code>; null when untemplated.</p>
</dd>
<dt><code>args</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd><p>Values interpolated into <code class="paramref">format</code>; null when untemplated.</p>
</dd>
<dt><code>detail</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>Optional detail data or exception. Null if not applicable.</p>
</dd>
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd><p>Carrier for the NC source block that triggered this diagnostic; null for pipeline-level messages.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_NcParsers_NcDiagnostic_Args_" data-uid="Hi.NcParsers.NcDiagnostic.Args*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_Args" data-uid="Hi.NcParsers.NcDiagnostic.Args">
Args
</h3>
<div class="markdown level1 summary"><p>Values interpolated into <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Format">Format</a>; null when untemplated.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object[] Args { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_Category_" data-uid="Hi.NcParsers.NcDiagnostic.Category*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_Category" data-uid="Hi.NcParsers.NcDiagnostic.Category">
Category
</h3>
<div class="markdown level1 summary"><p>Diagnostic category.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Category Category { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Common.Messages.Category.html">Category</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_Detail_" data-uid="Hi.NcParsers.NcDiagnostic.Detail*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_Detail" data-uid="Hi.NcParsers.NcDiagnostic.Detail">
Detail
</h3>
<div class="markdown level1 summary"><p>Optional detail data or exception. Null if not applicable.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object Detail { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_Format_" data-uid="Hi.NcParsers.NcDiagnostic.Format*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_Format" data-uid="Hi.NcParsers.NcDiagnostic.Format">
Format
</h3>
<div class="markdown level1 summary"><p>Composite-format template behind <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_Notification">Notification</a>; null when the diagnostic
was built from a plain string (untemplated).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Format { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_Id_" data-uid="Hi.NcParsers.NcDiagnostic.Id*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_Id" data-uid="Hi.NcParsers.NcDiagnostic.Id">
Id
</h3>
<div class="markdown level1 summary"><p>Structured diagnostic ID for filtering and suppression.
Normally <code>{Primary}-{Secondary}&ndash;{Abbrev}</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Id { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_Notification_" data-uid="Hi.NcParsers.NcDiagnostic.Notification*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_Notification" data-uid="Hi.NcParsers.NcDiagnostic.Notification">
Notification
</h3>
<div class="markdown level1 summary"><p>End-user friendly notification text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Notification { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_SentenceCarrier_" data-uid="Hi.NcParsers.NcDiagnostic.SentenceCarrier*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_SentenceCarrier" data-uid="Hi.NcParsers.NcDiagnostic.SentenceCarrier">
SentenceCarrier
</h3>
<div class="markdown level1 summary"><p>Carrier of the NC source block that triggered this diagnostic, exposing
both the source <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a> (via
<a class="xref" href="Hi.NcParsers.IGetSentence.html#Hi_NcParsers_IGetSentence_GetSentence">GetSentence()</a>) and the execution-order
<a class="xref" href="Hi.NcParsers.ISentenceIndexed.html#Hi_NcParsers_ISentenceIndexed_SentenceIndex">SentenceIndex</a>. Null for pipeline-level
messages (e.g., lifecycle start/done) that have no source block.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ISentenceCarrier SentenceCarrier { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_SentenceIndex_" data-uid="Hi.NcParsers.NcDiagnostic.SentenceIndex*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_SentenceIndex" data-uid="Hi.NcParsers.NcDiagnostic.SentenceIndex">
SentenceIndex
</h3>
<div class="markdown level1 summary"><p>Execution-order ordinal of the anchored NC source block, delegated from
<a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_SentenceCarrier">SentenceCarrier</a>. Returns <code>-1</code> (the &ldquo;not in pipeline&rdquo;
sentinel) for pipeline-level messages whose <a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_SentenceCarrier">SentenceCarrier</a>
is null.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int SentenceIndex { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_Severity_" data-uid="Hi.NcParsers.NcDiagnostic.Severity*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_Severity" data-uid="Hi.NcParsers.NcDiagnostic.Severity">
Severity
</h3>
<div class="markdown level1 summary"><p>Importance level.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Severity Severity { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_NcParsers_NcDiagnostic_GetArgs_" data-uid="Hi.NcParsers.NcDiagnostic.GetArgs*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetArgs" data-uid="Hi.NcParsers.NcDiagnostic.GetArgs">
GetArgs()
</h3>
<div class="markdown level1 summary"><p>Gets the values interpolated into <a class="xref" href="Hi.Common.Messages.IMessage.html#Hi_Common_Messages_IMessage_GetFormat">GetFormat()</a>; null when
<a class="xref" href="Hi.Common.Messages.IMessage.html#Hi_Common_Messages_IMessage_GetFormat">GetFormat()</a> is null, possibly empty for a hole-less template.
Default interface method so external implementers are unaffected.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object[] GetArgs()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd><p>The interpolation arguments, or null when untemplated.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_GetCategory_" data-uid="Hi.NcParsers.NcDiagnostic.GetCategory*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetCategory" data-uid="Hi.NcParsers.NcDiagnostic.GetCategory">
GetCategory()
</h3>
<div class="markdown level1 summary"><p>Gets the classification — see <a class="xref" href="Hi.Common.Messages.Category.html">Category</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Category GetCategory()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Common.Messages.Category.html">Category</a></dt>
<dd><p>The category of this message.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_GetDetail_" data-uid="Hi.NcParsers.NcDiagnostic.GetDetail*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetDetail" data-uid="Hi.NcParsers.NcDiagnostic.GetDetail">
GetDetail()
</h3>
<div class="markdown level1 summary"><p>Gets the optional detail payload or exception; null when not applicable.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object GetDetail()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>The detail object, or null.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_GetFormat_" data-uid="Hi.NcParsers.NcDiagnostic.GetFormat*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetFormat" data-uid="Hi.NcParsers.NcDiagnostic.GetFormat">
GetFormat()
</h3>
<div class="markdown level1 summary"><p>Gets the composite-format template behind <a class="xref" href="Hi.Common.Messages.IMessage.html#Hi_Common_Messages_IMessage_GetNotification">GetNotification()</a> — a
<code>{0}</code>-style .NET format string — when this message was produced from an
interpolated template; null when the notification has no structured template.
Together with <a class="xref" href="Hi.Common.Messages.IMessage.html#Hi_Common_Messages_IMessage_GetArgs">GetArgs()</a> this lets a consumer re-render the message
in another language without losing the interpolated live values, while
<a class="xref" href="Hi.Common.Messages.IMessage.html#Hi_Common_Messages_IMessage_GetNotification">GetNotification()</a> stays the invariant English rendering.
Default interface method so external implementers are unaffected.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string GetFormat()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The composite format string, or null when untemplated.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_GetId_" data-uid="Hi.NcParsers.NcDiagnostic.GetId*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetId" data-uid="Hi.NcParsers.NcDiagnostic.GetId">
GetId()
</h3>
<div class="markdown level1 summary"><p>Gets the structured id used for filtering / suppression; may be null.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string GetId()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The message id, or null when not applicable.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_GetNotification_" data-uid="Hi.NcParsers.NcDiagnostic.GetNotification*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetNotification" data-uid="Hi.NcParsers.NcDiagnostic.GetNotification">
GetNotification()
</h3>
<div class="markdown level1 summary"><p>Gets the end-user friendly notification text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string GetNotification()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The notification text.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_GetSentence_" data-uid="Hi.NcParsers.NcDiagnostic.GetSentence*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetSentence" data-uid="Hi.NcParsers.NcDiagnostic.GetSentence">
GetSentence()
</h3>
<div class="markdown level1 summary"><p>Returns the anchored NC source <a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a>, delegated from
<a class="xref" href="Hi.NcParsers.NcDiagnostic.html#Hi_NcParsers_NcDiagnostic_SentenceCarrier">SentenceCarrier</a>; null when there is no source block
(pipeline-level messages).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Sentence GetSentence()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.NcParsers.Sentence.html">Sentence</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_GetSeverity_" data-uid="Hi.NcParsers.NcDiagnostic.GetSeverity*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_GetSeverity" data-uid="Hi.NcParsers.NcDiagnostic.GetSeverity">
GetSeverity()
</h3>
<div class="markdown level1 summary"><p>Gets the importance level — see <a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Severity GetSeverity()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Common.Messages.Severity.html">Severity</a></dt>
<dd><p>The severity of this message.</p>
</dd>
</dl>
<a id="Hi_NcParsers_NcDiagnostic_ToString_" data-uid="Hi.NcParsers.NcDiagnostic.ToString*"></a>
<h3 id="Hi_NcParsers_NcDiagnostic_ToString" data-uid="Hi.NcParsers.NcDiagnostic.ToString">
ToString()
</h3>
<div class="markdown level1 summary"><p>Returns a string that represents the current object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>A string that represents the current object.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>