Namespace Hi.Common.Messages
Classes
- ActionProgress<T>
Lightweight IProgress<T> that delegates to an Action<T>. Unlike Progress<T>, does not capture SynchronizationContext and invokes the handler synchronously on the caller's thread.
- DebugUtil
Debug utility provides functions: pause process, count execution time and show the count.
- ExceptionUtil
Provides utility methods for handling exceptions.
- MessageBoardUtil
Utility class for displaying messages on a message board.
- MessageCollector
A minimal IProgress<T> of IMessage that buffers every reported message into Messages. Intended as a per-call / per-request sink: a caller injects it into a have-both function (one that takes an
IProgress<IMessage> messageProgress), runs the operation, then reads the collected messages back — e.g. to return them in an HTTP response so a REST / AI caller sees progress, success, and error notifications inline.Unlike the session / strip sinks (
SessionProgress,StepDiagnosticProgress) it fires no events and holds no session or pipeline state; it is cheap to create and discard for the lifetime of a single call.
- MessageUtil
Extension helpers for reporting SimpleMessage records onto an IProgress<T> of IMessage sink — the IMessage-channel counterpart of
NcDiagnosticProgress's shorthand methods. Every helper is named{Category}{Severity}and is id-first; the structuredidis used for filtering / suppression. All overloads are null-safe onhost.
- SimpleMessage
A plain IMessage with no anchor: severity, category, id, notification text and optional detail. This is the default carrier for ad-hoc messages that have no other home. When step context is available, a step-anchored decorator wraps a SimpleMessage to add the
StepIndex/SentenceCarrierwithout the producer needing to know it.
Interfaces
- IMessage
Common contract for a single reportable item on an IProgress<T> channel — an NC diagnostic, a step-anchored notice, a simple message, or a progress fraction. Consumers (GUI / log) treat every kind uniformly through this view, while each concrete kind is still stored by its own owner (e.g.
NcDiagnosticbyNcDiagnosticProgress,ClStripPosbyClStrip) rather than being mixed into one shared collection.
- IProgressMessage
Marker for an IMessage that is itself a container of messages (a batch produced over the course of some scoped work) rather than a single leaf notice. A sink may give it special treatment — unrolling its accumulated children, in order, instead of storing the composite object itself.
Empty by design: the contract is purely the marker. The children are exposed by the concrete type (e.g.
StepScopedProgress.MessageList) and drained at the point that owns the ordering guarantee, so a consumer that does not recognize IProgressMessage simply treats the composite as an opaque IMessage.
Enums
- BootstrapTheme
Bootstrap theme colors for UI styling.
- Category
Classification of an IMessage — the “what kind of concern” axis, orthogonal to the Severity importance axis it pairs with. Applies to every IMessage on the channel (lifecycle / progress notices, configuration checks, NC-pipeline diagnostics, …), not only NC messages.
- MessageFlag
Enumeration of common message types used for system notifications.
- Severity
Importance level of an IMessage. Combined with Category to form the full meaning (e.g.
Validation + Warning). Promoted from the formerNcDiagnosticSeverityso non-NC messages (simple notices, progress fractions) share a single scale.
Delegates
- ShowMessageBoardDelegate
Delegate for showing message board notifications.