Replies: 2 comments
-
Yes, I have seen a lot of such code in your examples too. Unfortunately I can't share with you examples in my private repositories with a lot of bindings, but for example I rarely use bindings with lambda functions. It looks much clearer and requires less support. I actually only use them when I want to add some sort of manual creation logic.
Unfortunately, there is no such way now. I will add a ticket about it. We need to come up with a convenient and simple API that eliminates ambiguities, for example - passing a parameter of the same type, dependence on parameter names.
This was done intentionally. Using a method that returns a parameter is much harder to replace when rewriting code using Roslyn's syntax tree. And it would lead to slower analysis and many potential errors, for example, when a lambda function contains conditional transitions and other non-trivial syntactic constructions. The current |
Beta Was this translation helpful? Give feedback.
-
Here's issue. Supplement it please. And if you have any ideas on API, I would be grateful if you share. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I found I have many lines of this kind that requires to construct the instance by using operator new
is there a way to achieve that without the need to provide every argument for the constructor but only the arguments that I choose. For example
This way if I add more arguments to ServiceDescriptor constructor I won't need to modify constructor call.
Another question. Why you choose inject to have out parameter instead of returning an instance?
Beta Was this translation helpful? Give feedback.
All reactions