sonar-dotnet icon indicating copy to clipboard operation
sonar-dotnet copied to clipboard

Improve MethodParameterLookup

Open Tim-Pohlmann opened this issue 1 year ago • 0 comments

Things to improve in regards to MethodParameterLookup:

  • Creation happens via constructors and factory methods, should be stream lined to only factory methods.
  • TryGetSyntax takes a IParameterSymbol turns it into a string to then lookup the symbol again. It should be possible to simplify this.
  • A string parameterName overload exists for TryGetSyntax but not for TryGetNonParamsSyntax.
  • Tests are very hard to extend. Might be worthwhile to change the format.
  • It does not support Extension Methods, which would be very useful.

Tim-Pohlmann avatar Mar 06 '23 09:03 Tim-Pohlmann