Ejemplo n.º 1
0
        public void Build(Expression expression)
        {
            PartialEvaluator evaluator = new PartialEvaluator();
            Expression evaluatedExpression = evaluator.Eval(expression);

            this.m_arguments = new List<object>();
            this.m_conditionParts = new Stack<string>();
            ConObjects = new List<object>();
            this.Visit(evaluatedExpression);

            this.Arguments = this.m_arguments.ToArray();
            if (evaluatedExpression.NodeType != ExpressionType.NewArrayInit)
                this.Condition = this.m_conditionParts.Count > 0 ? this.m_conditionParts.Pop() : null;
            else
            {

                foreach (var mConditionPart in m_conditionParts)
                {
                    this.Condition += mConditionPart + " ,";
                }
                this.Condition = this.Condition.Trim(',');
            }
        }
Ejemplo n.º 2
0
        public void Build(Expression expression)
        {
            PartialEvaluator evaluator           = new PartialEvaluator();
            Expression       evaluatedExpression = evaluator.Eval(expression);

            this.m_arguments      = new List <object>();
            this.m_conditionParts = new Stack <string>();
            ConObjects            = new List <object>();
            this.Visit(evaluatedExpression);

            this.Arguments = this.m_arguments.ToArray();
            if (evaluatedExpression.NodeType != ExpressionType.NewArrayInit)
            {
                this.Condition = this.m_conditionParts.Count > 0 ? this.m_conditionParts.Pop() : null;
            }
            else
            {
                foreach (var mConditionPart in m_conditionParts)
                {
                    this.Condition += mConditionPart + " ,";
                }
                this.Condition = this.Condition.Trim(',');
            }
        }