Пример #1
0
 public void DeclareVariable(XPathCompiledExpression compiledExpression)
 {
     if (_scopeStack is not null)
     {
         _scopeStack.Peek()[compiledExpression.Expression] = default;
     }
 }
Пример #2
0
        public object Evaluate(XPathCompiledExpression compiledExpression)
        {
            Infra.NotNull(ExecutionContext);

            compiledExpression.SetResolver(this);

            return(new DataModelXPathNavigator(ExecutionContext.DataModel).Evaluate(compiledExpression.XPathExpression) !);
        }
        public XPathLocationExpressionEvaluator(ILocationExpression locationExpression, XPathCompiledExpression compiledExpression)
        {
            _locationExpression = locationExpression;
            _compiledExpression = compiledExpression;

            if (_locationExpression.Is <XPathLocationExpression>(out var xPathLocationExpression))
            {
                _assignType = xPathLocationExpression.AssignType;
                _attribute  = xPathLocationExpression.Attribute;
            }
            else
            {
                _assignType = XPathAssignType.ReplaceChildren;
            }
        }
Пример #4
0
 public XPathValueExpressionEvaluator(IValueExpression valueExpression, XPathCompiledExpression compiledExpression)
 {
     _valueExpression    = valueExpression;
     _compiledExpression = compiledExpression;
 }
Пример #5
0
 public string GetName(XPathCompiledExpression compiledExpression) => compiledExpression.Expression;
Пример #6
0
 public XPathConditionExpressionEvaluator(IConditionExpression conditionExpression, XPathCompiledExpression compiledExpression)
 {
     _conditionExpression = conditionExpression;
     _compiledExpression  = compiledExpression;
 }