Class NcCompositionGate
License gate for the NC composition layer — the capability of registering external (non-built-in) processing units into a SoftNcRunner pipeline, and of executing NC-embedded C# scripts (ActLineCsScript).
The boundary: the script layer (calling the public API from your own application code, e.g. session scripts) needs no extra license; the composition layer (registering or replacing processing units inside the interpretation pipeline — NcSyntaxList, PipelineNcDependencyList, NcSemanticList, NcInitializationList, Segmenter — or injecting per-line scripts into it) requires NcComposition.
A unit is built-in when its concrete type lives in this library's own assembly; anything else is external. Order, count, duplication and constructor configuration of built-in units are unrestricted — the gate never inspects the shape of the pipeline, only the identity of each unit.
Degradation is silent and functional: without the license the built-in
dialects run unchanged; external units are skipped for the session and a
single Composition--NotLicensed diagnostic lists them. The decision
and its rejection record live in the native license module.
public static class NcCompositionGate
- Inheritance
-
NcCompositionGate
- Inherited Members
Methods
CollectForeignUnits(SoftNcRunner, List<INcDependency>)
Collects every external (non-built-in) processing unit reachable from the given runner's five pipeline members: the syntax list (descending into BundleSyntax nesting), the dependency list, the semantic list, the initializer list, and the segmenter. Pure inspection — nothing is licensed, mutated, or resolved here.
public static List<object> CollectForeignUnits(SoftNcRunner runner, List<INcDependency> resolvedNcDependencyList = null)
Parameters
runnerSoftNcRunnerRunner whose composed pipeline is inspected.
resolvedNcDependencyListList<INcDependency>Optional proxy-resolved dependency list to inspect instead of the runner's raw PipelineNcDependencyList (the session gate passes EffectiveNcDependencyList so the concrete proxied instances are judged, not the proxies).
Returns
IsBuiltIn(Type)
Whether the given concrete processing-unit type is built-in — i.e. defined in this library's own assembly. External (customer-authored) unit types return false regardless of their name.
public static bool IsBuiltIn(Type unitType)
Parameters
unitTypeTypeConcrete type of a pipeline processing unit.
Returns
- bool
True when the type is built-in.
IsEmbeddedScriptLicensed()
Whether NC-embedded C# scripts (ActLineCsScript — NC-comment markers, CSV script columns, per-line script injection) may execute. Fresh native license query for NcComposition; callers on hot paths cache the answer per play.
public static bool IsEmbeddedScriptLicensed()
Returns
PassComposition(IReadOnlyCollection<object>)
Native decision point: pass when no external unit is present, or when NcComposition is licensed. The rejection (with the unit names) is recorded on the native side. A core.dll that predates the gate fails closed for external units.
public static bool PassComposition(IReadOnlyCollection<object> foreignUnits)
Parameters
foreignUnitsIReadOnlyCollection<object>External units collected by CollectForeignUnits(SoftNcRunner, List<INcDependency>).
Returns
- bool
True when the composed pipeline may run as-is.