Esempio n. 1
0
 public ExpressionParsingContext(LambdaParsingContext lambda, ParameterExpression[] parameters)
 {
     Lambda = lambda;
     m_parameters = new Dictionary<string, ParameterExpression>();
     foreach (var parameter in parameters)
     {
         m_parameters.Add(parameter.Name, parameter);
     }
 }
Esempio n. 2
0
 public ExpressionParsingContext(LambdaParsingContext lambda, ParameterExpression[] parameters)
 {
     Lambda       = lambda;
     m_parameters = new Dictionary <string, ParameterExpression>();
     foreach (var parameter in parameters)
     {
         m_parameters.Add(parameter.Name, parameter);
     }
 }
Esempio n. 3
0
        public static LambdaExpression Parse(LambdaParsingContext context, string s)
        {
            var lambdaNode = Parse(new Tokenizer(s));

            var parameters = new ParameterExpression[] {
                Expression.Parameter(context.ModelType, "m")
            };

            var expression = lambdaNode.P2.GetExpression(new ExpressionParsingContext(context, parameters));

            return Expression.Lambda(expression, parameters);
        }
Esempio n. 4
0
        public static LambdaExpression Parse(LambdaParsingContext context, string s)
        {
            var lambdaNode = Parse(new Tokenizer(s));

            var parameters = new ParameterExpression[] {
                Expression.Parameter(context.ModelType, "m")
            };

            var expression = lambdaNode.P2.GetExpression(new ExpressionParsingContext(context, parameters));

            return(Expression.Lambda(expression, parameters));
        }