conwid / DependencyInjectionToolset

Other
12 stars 5 forks source link

Incorporating new language features #8

Open conwid opened 6 years ago

conwid commented 6 years ago

The currently generated guard clauses could be made a lot more elegant by using the nameof operator and throw expressions. But in order to do this, first we should be able to determine the selected C# language version of the project. See the stackoverflow question:

https://stackoverflow.com/questions/50176715/roslyn-net-compiler-platform-get-current-project-c-sharp-language-version

conwid commented 6 years ago

This would be probably possible by changing the whole idea behind the tool and instead of a CodeRefactoringProvider, an Analyzer and a CodeFixProvider should be created. When registering a syntax node action with RegisterSyntaxNodeAction, the language version can be set.