DelegateDecompiler icon indicating copy to clipboard operation
DelegateDecompiler copied to clipboard

Feat - extending decompilation to referenced queries

Open magicmoux opened this issue 3 years ago • 5 comments

@hazzik here's PR #209 merged directly into OtpimzeExpressionVisitor.cs

Once again, I committed the unit tests first for demonstration.

magicmoux avatar Oct 25 '22 14:10 magicmoux

@magicmoux please rebase.

hazzik avatar Oct 26 '22 05:10 hazzik

I've fixed majority of the cases except EF tests. Also, it seems that decompilation here is going too far and maybe undesirable for some users.

hazzik avatar Oct 26 '22 05:10 hazzik

The nesting handling is so simple that I did not see it sitting right in front of me

Also, it seems that decompilation here is going too far and maybe undesirable for some users.

I suppose you're talking about the fact that the solution provided here assumes that any IQueryable referenced by fields or local variables would be forcibly decompiled ?

magicmoux avatar Oct 26 '22 10:10 magicmoux

@hazzik rebased and I restricted dereferencing queryables only to explicitly decompiled instances (also applied this to the EF tests) This helps reflect the DecompileAttribute usage (which is not applicable in those cases) for local variables and class fields.

magicmoux avatar Oct 26 '22 12:10 magicmoux

I suppose you're talking about the fact that the solution provided here assumes that any IQueryable referenced by fields or local variables would be forcibly decompiled ?

yes

hazzik avatar Oct 26 '22 20:10 hazzik