Interface IScopeNestingRule
Declarative nesting constraint on a definition — reusable, generic validation instead of ad-hoc
per-type checks in the validator. While walking the definition tree the validator calls
for each enclosing scope (a node implementing );
a fails the build, a logs a
warning. Any future definition that must constrain where it nests just implements this interface —
the validator never changes.
Scopes advertise their category with marker interfaces (,
), so a rule reacts to a category rather than to concrete types.
public interface IScopeNestingRule
Methods
CheckAncestor(IProcessorDefinition)
Evaluates this node's policy against one enclosing scope ancestor.
NestingVerdict CheckAncestor(IProcessorDefinition ancestor)