-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ExpressionMethod Generator #2695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Does it make sense to handle some C# expressions, not supported by S.L.E
, like ??
, ?.
?
I think the compiler will catch that when actually compiling the generated code. Probably won't be descriptive to the user though. That's a whole 'nother level of analysis though. I'd say let's do that in v2 of this thing if it looks like an issue. |
I'ld like to see more complex tests with several parameters. |
Added one more complicated one. Anything specific you'd like to see in another one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it looks complicated for end user.
- Class should be defined as partial
- Method should be partial
- No way do define over property.
i suggest to change ExpressionMethodAttribute a little and maybe create base class. It should have at least one virtual method GetLambdaExpression. Then we can derive ExpressionMethodGenerator
from base class return lambda in any case.
For generation we can always create static class MySuperClass_generated and generate methods in that class.
|
* Nested Classes * Properties * Custom Names
Merry Christmas @sdanyliv - Now doesn't require |
addressed here #2758 |
@sdanyliv @MaceWindu any reason for or against this in 3.3.0? I don't particularly care, it was built on an idea from @sdanyliv |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
@viceroypenguin I would say let's merge it after tests passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check my comments.
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
I don't understand. Nothing big changed with last commits except merge with master, but now it doesn't build with a lot of errors... |
nevermind, just some glitch, after rebuild it complains about code referencing removed |
@viceroypenguin, reminder about broken branch |
Thanks @MaceWindu. Will revisit when I have time to do so. |
Fixes #2687
ExpressionMethodGenerator