Beispiel #1
0
 public EvalRootState Start(
     PatternMatchCallback callback,
     PatternContext context,
     MatchedEventMap beginState,
     bool isRecoveringResilient)
 {
     return StartInternal(callback, context, beginState, isRecoveringResilient);
 }
Beispiel #2
0
        private EvalRootState StartInternal(
            PatternMatchCallback callback,
            PatternContext context,
            MatchedEventMap beginState,
            bool isRecoveringResilient)
        {
            if (beginState == null) {
                throw new ArgumentException("No pattern begin-state has been provided");
            }

            var rootStateNode = NewState(null);
            var rootState = (EvalRootState) rootStateNode;
            rootState.Callback = callback;
            rootState.StartRecoverable(isRecoveringResilient, beginState);
            return rootState;
        }
        public PatternAgentInstanceContext(
            PatternContext patternContext,
            AgentInstanceContext agentInstanceContext,
            bool hasConsumingFilter,
            Func<FilterSpecActivatable, FilterValueSetParam[][]> contextAddendumFunction)
        {
            this.patternContext = patternContext;
            this.agentInstanceContext = agentInstanceContext;
            this.contextAddendumFunction = contextAddendumFunction;

            if (hasConsumingFilter) {
                consumptionHandler = new EvalFilterConsumptionHandler();
            }
            else {
                consumptionHandler = null;
            }
        }