public static Func <TResult> Compile <TResult>(this Expression <Func <TResult> > expression) { var d = ExpressionCompiler.Compile((LambdaExpression)expression); return(() => (TResult)d.DynamicInvoke()); }
public static Action <T1> Compile <T1>(this Expression <Action <T1> > expression) { var d = ExpressionCompiler.Compile((LambdaExpression)expression); return((p1) => d.DynamicInvoke(p1)); }
public static Action <T1, T2, T3, T4> Compile <T1, T2, T3, T4>(this Expression <Action <T1, T2, T3, T4> > expression) { var d = ExpressionCompiler.Compile((LambdaExpression)expression); return((p1, p2, p3, p4) => d.DynamicInvoke(p1, p2, p3, p4)); }
public static Func <T1, T2, T3, T4, TResult> Compile <T1, T2, T3, T4, TResult>(this Expression <Func <T1, T2, T3, T4, TResult> > expression) { var d = ExpressionCompiler.Compile((LambdaExpression)expression); return((p1, p2, p3, p4) => (TResult)d.DynamicInvoke(p1, p2, p3, p4)); }