Closed dpoeschl closed 3 weeks ago
FYI @CyrusNajmabadi I hit this during AddParameter and generate the wrong type of named arguments in attribute construction because of it. Do you know what the expected solution to this is (is it SyntaxGenerator extension or Formatter/etc. fixing?
FYI @ryzngard
Yeah, sounds like a tricky thing here. We could add an internal overload that allows you to specify which kind you want. The existing one would just say "nameColon" as the type since that's what it does right now
Here's how I implemented this for a refactoring in dotnet/roslyn-analyzers:
Closing out due to lack of feedback.
Version Used: 16.6
See http://sourceroslyn.io/#Microsoft.CodeAnalysis.Workspaces/Editing/SyntaxGenerator.cs,101b838d04b7ec50 for the lack of this option. I tried using a normal named argument instead, but the Formatter (I think) choked on that later. Perhaps that's the bug instead, but someone who understands the SyntaxGenerator better should decide what's expected here.