Example #1
0
        /// <summary>Searched recursivly for pattern evaluation filter nodes. </summary>
        /// <param name="currentNode">is the root node</param>
        /// <returns>list of filter nodes</returns>
        public static EvalNodeAnalysisResult RecursiveAnalyzeChildNodes(EvalForgeNode currentNode)
        {
            var evalNodeAnalysisResult = new EvalNodeAnalysisResult();

            RecursiveAnalyzeChildNodes(evalNodeAnalysisResult, currentNode);
            return(evalNodeAnalysisResult);
        }
Example #2
0
        private static void RecursiveAnalyzeChildNodes(
            EvalNodeAnalysisResult evalNodeAnalysisResult,
            EvalForgeNode currentNode)
        {
            if (currentNode is EvalFilterForgeNode ||
                currentNode is EvalGuardForgeNode ||
                currentNode is EvalObserverForgeNode ||
                currentNode is EvalMatchUntilForgeNode ||
                currentNode is EvalEveryDistinctForgeNode)
            {
                evalNodeAnalysisResult.AddNode(currentNode);
            }

            if (currentNode is EvalObserverForgeNode)
            {
                evalNodeAnalysisResult.AddNode(currentNode);
            }

            foreach (EvalForgeNode node in currentNode.ChildNodes)
            {
                RecursiveAnalyzeChildNodes(evalNodeAnalysisResult, node);
            }
        }