hazzik / DelegateDecompiler

A library which is able to decompile a delegate or a method body to its lambda representation
MIT License
526 stars 62 forks source link

Fix for decompiled calls to native Linq Api #151

Closed magicmoux closed 2 years ago

magicmoux commented 5 years ago

Hi @hazzik,

I've been testing DD for awhile in some side-project and I've encountered a case where the decompilation processor returns call-instructions to the Native Linq API, like

call Expression`1[...] Lambda[Func`2](System.Linq.Expressions.Expression, System.Linq.Expressions.ParameterExpression[])

If I'm not mistaken, these calls can be translated into lambdas and/or, let's say can at least be directly interpreted , here is a Processor.cs implementation to handle such cases.

Could you please take a look on it and tell me whether the solution is acceptable ? Sorry, I'm not yet able to provide unit tests about those cases (in fact, my side-project follows a similar approach to the late KnockoutMVC you mentioned in #122 .)

Max.

magicmoux commented 4 years ago

Hi @hazzik, long time no see,

could you take a look at this PR please ? Thanks and good year's end in advance . Max.