Table of Contents

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

sink IProgress<StepDiagnostic>

The step-anchored destination; null yields a null adapter.

stepIndex int

Motion-step index to anchor plain messages to (typically ShellThreadStepIndex).

carrier ISentenceCarrier

Optional NC-source carrier for the step; may be null.

Returns

IProgress<IMessage>