Is there a library that can decompile a method into an Expression tree, with support for CLR 4.0?

前端 未结 2 1433
醉酒成梦
醉酒成梦 2021-01-13 08:00

Previous questions have asked if it is possible to turn compiled delegates into expression trees, for example:

  • converting a .net Func to a .net Expres
相关标签:
2条回答
  • 2021-01-13 08:36

    Based on the response, I'm going to answer my question:

    No.

    Though of course if someone comes up with a better answer (or I come across one) I will update.

    0 讨论(0)
  • 2021-01-13 08:55

    I did a library that supports .NET 3.5 expression trees:
    https://github.com/ashmind/expressive

    I tried to do internal API so that .NET 4.0 support would not be that hard to add.
    You can add or change steps in the IPipeline implementation to achieve just that.

    One thing that I haven't done and that will be hard is support for loops, though.

    0 讨论(0)
提交回复
热议问题