public static Expression ExtractBody <TResult>(Expression <Func <TResult> > lambda) { Argument.NotNull <Expression <Func <TResult> > >(lambda, "lambda"); return(lambda.Body); }
public static Expression ExtractBody <T1, T2, T3, T4, TResult>(Expression <Func <T1, T2, T3, T4, TResult> > lambda, Expression param1, Expression param2, Expression param3, Expression param4) { Argument.NotNull <Expression <Func <T1, T2, T3, T4, TResult> > >(lambda, "lambda"); Expression[] newParams = new Expression[] { param1, param2, param3, param4 }; return(ExtractBody(lambda, newParams)); }
internal static Expression <Func <T, TKey> > AsLambdaSafe <T, TKey>(Function <T, TKey> func, string argName) { Argument.NotNull <Function <T, TKey> >(func, argName); return(func.Expression); }