YairHalberstadt / stronginject

compile time dependency injection for .NET
MIT License
845 stars 24 forks source link

[Idea] Variable/Method names readability #107

Closed MartyIX closed 3 years ago

MartyIX commented 3 years ago

Hi Yair,

Version 1.0.8 generates for code like this:

private global::Project.Services.SymbolConverter GetSingleInstanceField2()

Would you consider to change it to something like this:

private global::Project.Services.SymbolConverter GetSymbolConverterField2()

?

Obviously, it's not perfect but it would be much easier to read the generated code. I realize that not that many people actually are supposed to read the generated code. However, I suspect that it is necessary to read the generated code when one hits a bug.

Anyway, it's an idea, maybe you find it worth it.

Thanks for any feedback!

MartyIX commented 3 years ago

Seems like you have beaten me to it by half an hour: #106

YairHalberstadt commented 3 years ago

@MartyIX thanks for the feedback - I actually hasn't considered method names, so thanks for reminding me that they also need to be improved!