Closed latop2604 closed 1 day ago
Does it make any difference?
For readability, I would say yes, otherwise, no.
I think it would better match with what a dev would have written by hand. But maybe I'm wrong.
I know it can be a subjective question.
I can do a PR if you want
While it is nice to have a readable generated source, it's probably not the main goal. There are lots of things which developer would've done differently - having namespaces usings instead of full type names, for instance. At this point, I would prefer to keep the code simplier over having this minor readability improvement. Especially considering this item - #4 .
Still, thanks a lot for the suggestion and feedback!
When using
AsSelf = true
, it generates something likeservice.AddTransient<MyNamespace.MyClass,MyNamespace.MyClass>()
.It would be nice if it could produce instead
service.AddTransient<MyNamespace.MyClass>()