Shortcomings in Syntax Tree API - no common base class or interface for MethodDeclarationSyntax, FieldDeclarationSyntax etc. for important common properties #10455
Labels
Area-Compilers
Concept-API
This issue involves adding, removing, clarification, or modification of an API.
Feature Request
Milestone
Version Used:
Visual Studio 2015 Update 2
Shortcomings in Syntax Tree API:
While writing code for a code refactoring very often you need to perform similar checks or modifications on members containing actual code: methods, property accessors, indexer accessors etc. Most of them have common properties like
Body
,Modifiers
,AttributeLists
,ArgumentList
.There is no common base class or a common interface which would expose these common properties. That's why you end up with a lot of code duplication, with all consequences as shown in example below:
Suggestion:
Modifiers
,AttributeLists
,Body
,ArgumentList
. This solution will have less implementation and runtime impact.Related to: #9908
The text was updated successfully, but these errors were encountered: