private Specification BuildNode(XmlElement node) { if (!_operatorMap.ContainsKey(node.Name)) { throw new XmlSpecificationCompilerException("Unknown Xml specification node: " + node.Name); } IXmlSpecificationCompilerOperator op = _operatorMap[node.Name]; Specification spec = op.Compile(node, _compilerContext); string test = GetAttributeOrNull(node, "test"); if (test != null) { spec.TestExpression = CreateExpression(test, GetAttributeOrNull(node, "expressionLanguage")); } spec.FailureMessage = GetAttributeOrNull(node, "failMessage"); return(spec); }
private void AddOperator(IXmlSpecificationCompilerOperator op) { _operatorMap.Add(op.OperatorTag, op); }