次の設定を検討してください。
class A { public int x; }
class B { public int y; }
static class Helper
{
    public static Expression<Func<B>> BindInput(
        Expression<Func<A, B>> expression,
        A input)
    {
        //TODO
    }
}
static void Main(string[] args)
{
    Expression<Func<B>> e = Helper.BindInput(
        (A a) => new B { y = a.x + 3 },
        new A { x = 4 });
    Func<B> f = e.Compile();
    Debug.Assert(f().y == 7);
}
このメソッドでやりたいのBindInputは、式を変換してinput埋め込まれるようにすることです。の使用例でMainは、結果の式eは次のようになります。
() => new B { y = input.x + 3 }
ここinputで、はに渡された2番目の値ですBindInput。
どうすればこれを行うことができますか?
編集:
次の式eは私が探しているものではないことを追加する必要があります。
((A a) => new B { y = a.x + 3 })(input)
これは、既存の式の上にレイヤーを追加するだけなので、取得するのはかなり簡単です。