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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
        }
Beispiel #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));
        }