Collection initializers are just a syntactic sugar for calling an Add() method. When calling the Add() method explicitly, I get signature help:

However, when using the collection initializer syntax, I don't:

Version Used:
Microsoft Visual Studio Enterprise 2019 Int Preview
Version 16.4.0 Preview 2.0 [29322.22.master]
VisualStudio.16.IntPreview/16.4.0-pre.2.0+29322.22.master
I'd like to try and give this a shot
Where would I need to start?
I'd like to try and give this a shot
Where would I need to start?
@jasonmalinowski can probably point you somewhere. I suspect you can start by looking at the types derived from AbstractCSharpSignatureHelpProvider.
Indeed, a few steps for this:
Oh... fyi, i heard about this last night and already started a PR on hte matter :-/
Oh... fyi, i heard about this last night and already started a PR on hte matter :-/
Of course you did :-)
@CyrusNajmabadi for what it's worth, I'd rather see the feature get in than be the one to do it ☺
+1 if only for consistency and completeness.
Would it make sense to do any of the following:
@RikkiGibson sure. it's just a question of motivation.
- include element initializers in Find All References results for Add methods
Yes.
- go to the appropriate Add method on F12 of the curly brace for the element initializer
Maybe? I think this would never occur to me.
Here's the location we would need to update for find-refs: https://github.com/dotnet/roslyn/blob/6dab121ff512e2bcc5028149d7705d3ba2d51a72/src/Workspaces/Core/Portable/FindSymbols/FindReferences/Finders/OrdinaryMethodReferenceFinder.cs#L94-L105
We already have the concept of being able to find special methods. It would just be a matter of adding support for this additional special method and putting the right information in our indices to determine which documents to search.
The index to update would be: https://github.com/dotnet/roslyn/blob/master/src/Workspaces/Core/Portable/FindSymbols/SyntaxTree/SyntaxTreeIndex_Forwarders.cs
@RikkiGibson, would you mind filing suggestions for your comments?
One issue already existed, and I filed another issue to follow up on these.
Most helpful comment
Oh... fyi, i heard about this last night and already started a PR on hte matter :-/