Class StepPropertyAccessDictionaryDependency
- Namespace
- Hi.NcParsers.Dependencys.SystemWired
- Assembly
- HiMech.dll
Exposes the host's step-variable registry to NC pipeline components (today: CsvRowSyntax) as a narrow IStepPropertyAccessHost surface.
The provider is wired by the host (e.g. LocalProjectService) so
the dependency does not carry strong references to host types; this lets
the runner be created before the host is fully constructed and reused
across project loads.
A sibling MachiningServiceDependency exposes the broader IMachiningService surface to client-authored syntaxes. The two dependencies are independent — production hosts typically wire both providers to the same backing object, but a test fixture can supply just this narrow one.
public class StepPropertyAccessDictionaryDependency : INcDependency, IMakeXmlSource
- Inheritance
-
StepPropertyAccessDictionaryDependency
- Implements
- Inherited Members
- Extension Methods
Constructors
StepPropertyAccessDictionaryDependency()
Initializes a new instance with no HostProvider; the host wires one before queries.
public StepPropertyAccessDictionaryDependency()
StepPropertyAccessDictionaryDependency(Func<IStepPropertyAccessHost>)
Initializes a new instance with the given HostProvider.
public StepPropertyAccessDictionaryDependency(Func<IStepPropertyAccessHost> provider)
Parameters
providerFunc<IStepPropertyAccessHost>Delegate that resolves the live host at lookup time.
Properties
Host
The live host, or null when HostProvider is unset or returns null.
public IStepPropertyAccessHost Host { get; }
Property Value
HostProvider
Runtime provider for the host. Null provider or null return means the host is not wired (e.g. the dependency sits in a runner that runs in a unit-test fixture without a real project service). Consumers must null-check before use.
public Func<IStepPropertyAccessHost> HostProvider { get; set; }
Property Value
XName
XML element name used to register this dependency with XFactory.
public static string XName { get; }
Property Value
Methods
MakeXmlSource(string, string, bool)
Runtime-only dependency — the provider is wired per host and not meaningful to persist; serialization writes only the empty element so the dependency survives an XML round-trip.
public XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)
Parameters
Returns
Reg(XFactory)
Registers this type's deserializer with the given XFactory
(or Default when factory is
null). Idempotent.
public static void Reg(XFactory factory = null)
Parameters
factoryXFactory