private static Expression ReplaceLambda(Expression e, LambdaExpression what, LambdaExpression with) { var r = new LambdaReplacer(what, with); var newE = r.Visit(e); return(newE); }
public static Expression <Func <T, T1> > Replace <T, T1, T3>(this Expression <Func <T, T1> > e, Expression <Func <T, T3> > what, LambdaExpression with) { var r = new LambdaReplacer(what, with); var newE = r.Visit(e); return((Expression <Func <T, T1> >)newE); }