Esempio n. 1
0
        public RegexPartitionStateRandomAccess GetAccess(ExprEvaluatorContext exprEvaluatorContext)
        {
            int agentInstanceId = exprEvaluatorContext.AgentInstanceId;
            RegexExprPreviousEvalStrategy strategy = _strategies.Array[agentInstanceId];

            return(strategy.GetAccess(exprEvaluatorContext));
        }
Esempio n. 2
0
        public object Evaluate(EvaluateParams evaluateParams)
        {
            var access          = _strategy.GetAccess(evaluateParams.ExprEvaluatorContext);
            var substituteEvent = access.GetPreviousEvent(_assignedIndex);

            if (substituteEvent == null)
            {
                return(null);
            }

            // Substitute original event with prior event, evaluate inner expression
            var eventsPerStream = evaluateParams.EventsPerStream;
            var originalEvent   = eventsPerStream[_streamNumber];

            eventsPerStream[_streamNumber] = substituteEvent;
            var evalResult = _evaluator.Evaluate(evaluateParams);

            eventsPerStream[_streamNumber] = originalEvent;

            return(evalResult);
        }
Esempio n. 3
0
 public RegexPartitionStateRandomAccess GetAccess(ExprEvaluatorContext exprEvaluatorContext)
 {
     return(_strategy.GetAccess(exprEvaluatorContext));
 }