dotnet/roslyn

Signature help for delegate types

Aperta

#46.190 aperta il 21 lug 2020

 (42 commenti) (5 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-IDEIDE-IntelliSensehelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

If you're looking at this, ready to type a lambda, how do you know what to type next?

image

If it's Func<...> or Action<...> it's easy. For two or three others, I have the signature memorized and can translate the generic types in my head to the appropriate locations (e.g. Predicate<X>). For 99% of delegate types, it's a bunch of F12ing or F1ing every time.

Could signature help show something like this?

ParseArgument<SemanticVersion> is (ArgumentResult result) => SemanticVersion

@CyrusNajmabadi mentioned that something similar is already shown for anonymous types: image

🔗 Also reported at AB#1244148

Guida contributor