示例#1
0
        private Node CreateConditionNodeOfT <T>(TypeDispatchNode root, Expression <Func <T, bool> > expression)
        {
            var conditionNode = new ConditionNode <T>(expression);

            root.Add(conditionNode);

            return(conditionNode);
        }
示例#2
0
        protected bool Visit <T>(ConditionNode <T> node)
        {
            _expressions
            .Select((expression, index) => new { Text = expression.ToString(), Index = index })
            .Where(x => x.Text == node.Expression.ToString())
            .Each(match => { _conditionNodes[match.Index] = node; });

            return(_conditionNodes.Where(x => x == null).Count() > 0);
        }
示例#3
0
        protected bool Visit <T>(ConditionNode <T> node)
        {
            _lastNodeVertex = GetSink(node.GetHashCode(), () => node.Body, typeof(ConditionNode <>), typeof(T));

            if (_stack.Count > 0)
            {
                _edges.Add(new Edge(_stack.Peek(), _lastNodeVertex, _lastNodeVertex.TargetType.Name));
            }

            return(true);
        }
示例#4
0
        private void MatchExistingConditionNode <T>(ConditionDeclaration condition, ConditionNode <T> node)
        {
            if (condition.MatchType != typeof(T))
            {
                return;
            }

            if (node.Expression.ToString() != condition.Expression.ToString())
            {
                return;
            }

            AlphaNode <T> alphaNode = node.GetAlphaNode();
        }
示例#5
0
        protected bool Visit <T>(ConditionNode <T> node)
        {
            Append("Condition<{0}>: {1}", typeof(T).Name, node.Expression);

            return(true);
        }