You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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
The text was updated successfully, but these errors were encountered: