public void Init() { _expr = CreateExpression(); _lightExpr = CreateLightExpression(); _exprCompiled = _expr.Compile(); _exprCompiledFast = _expr.CompileFast(true); _lightExprCompiledFast = LightExpression.ExpressionCompiler.CompileFast(_lightExpr, true); }
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)); }