Вопрос

I'm wondering what steps the (v3+) compiler takes to build LINQ expressions for methods that take an expression argument. In particular, does the compiler use, or share logic with, LeafExpressionConverter? (That could require first generating an Expr then converting it.) If there is a separate mechanism, is anything done to ensure parity with LeafExpressionConverter?

Это было полезно?

Решение

Yes, I believe that it uses LeafExpressionConverter.QuotationToLambdaExpression. Search for quote_to_linq_lambda_info in the open source compiler code base.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top