dotnet/roslyn

Signature help for delegate types

开放

#46,190 创建于 2020年7月21日

 (42 条评论) (5 个反应) (0 位负责人)C# (4,257 个派生)batch import
Area-IDEIDE-IntelliSensehelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

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

贡献者指南