示例#1
0
        public static Func <TResult> Compile <TResult>(this Expression <Func <TResult> > expression)
        {
            var d = ExpressionCompiler.Compile((LambdaExpression)expression);

            return(() => (TResult)d.DynamicInvoke());
        }
示例#2
0
        public static Action <T1> Compile <T1>(this Expression <Action <T1> > expression)
        {
            var d = ExpressionCompiler.Compile((LambdaExpression)expression);

            return((p1) => d.DynamicInvoke(p1));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }