Class StepDiagnosticAnchorUtil
- Namespace
- Hi.MachiningProcs
- Assembly
- HiMech.dll
Bridges a step-anchored IProgress<T> sink (e.g.
StepDiagnosticProgress) back to the generic IProgress<T> surface, so
out-of-step-pipeline producers can keep using the id-first MessageUtil shorthands
(ValidationError, ConfigurationWarning, …) and still land a
StepDiagnostic on the sink.
public static class StepDiagnosticAnchorUtil
- Inheritance
-
StepDiagnosticAnchorUtil
- Inherited Members
Methods
AnchoredToStep(IProgress<StepDiagnostic>, int, ISentenceCarrier)
Wraps sink in an IProgress<T> that upgrades every
reported message to a StepDiagnostic anchored to stepIndex /
carrier (an already-anchored StepDiagnostic passes through
unchanged). Returns null when sink is null, so the
null-safe MessageUtil shorthands remain a no-op.
public static IProgress<IMessage> AnchoredToStep(this IProgress<StepDiagnostic> sink, int stepIndex, ISentenceCarrier carrier = null)
Parameters
sinkIProgress<StepDiagnostic>The step-anchored destination; null yields a null adapter.
stepIndexintMotion-step index to anchor plain messages to (typically ShellThreadStepIndex).
carrierISentenceCarrierOptional NC-source carrier for the step; may be null.