Example #1
0
        public void Init()
        {
            _expr      = CreateExpression();
            _lightExpr = CreateLightExpression();

            _exprCompiled          = _expr.Compile();
            _exprCompiledFast      = _expr.CompileFast(true);
            _lightExprCompiledFast = LightExpression.ExpressionCompiler.CompileFast(_lightExpr, true);
        }
Example #2
0
        private static LightExpression.Expression <Func <B, X> > ComposeManualExprWithParams(LightExpression.Expression aConstExpr)
        {
            var bParamExpr = LightExpression.Expression.Parameter(typeof(B), "b");

            return(LightExpression.Expression.Lambda <Func <B, X> >(
                       LightExpression.Expression.New(typeof(X).GetTypeInfo().DeclaredConstructors.First(), aConstExpr, bParamExpr),
                       bParamExpr));
        }