提交 9152f680 编写于 作者: G Gen Lu

Add comments

上级 ccc3faa4
......@@ -78,7 +78,7 @@ private static bool TryGetReceiverTypeSymbol(SyntaxContext syntaxContext, ISynta
_ => symbol as ITypeSymbol,
};
private CompletionItem Convert(SerializableImportCompletionItem serializableItem)
private CompletionItem Convert(SerializableImportCompletionItem serializableItem)
=> ImportCompletionItem.Create(
serializableItem.Name,
serializableItem.Arity,
......
......@@ -229,8 +229,13 @@ private struct MetadataInfoCreator : IDisposable
// The set of type definitions we've read out of the current metadata reader.
private readonly List<MetadataDefinition> _allTypeDefinitions;
// Map from node represents extension method to list of possible parameter type info
// (which can be more than one because we might have multiple overloads).
// Map from node represents extension method to list of possible parameter type info.
// We can have more than one if there's multiple methods with same name but different target type.
// e.g.
//
// public static bool AnotherExtensionMethod1(this int x);
// public static bool AnotherExtensionMethod1(this bool x);
//
private MultiDictionary<MetadataNode, ParameterTypeInfo> _extensionMethodToParameterTypeInfo;
private bool _containsExtensionsMethod;
......@@ -368,6 +373,7 @@ private void GenerateMetadataNodes()
{
if (definition.Kind == MetadataDefinitionKind.Member)
{
// We need to support having multiple methods with same name but different target type.
_extensionMethodToParameterTypeInfo.Add(childNode, definition.TargetTypeInfo);
}
......
......@@ -181,9 +181,9 @@ internal interface ISyntaxFactsService : ILanguageService
/// <param name="allowImplicitTarget">
/// In VB, we have a member access expression with a null expression, this may be one of the
/// following forms:
/// 1) new With { .a = 1, .b = .a <-- .a refers to the anonymous type
/// 2) With obj : .m <-- .m refers to the obj type
/// 3) new T() With { .a = 1, .b = .a <-- 'a refers to the T type
/// 1) new With { .a = 1, .b = .a .a refers to the anonymous type
/// 2) With obj : .m .m refers to the obj type
/// 3) new T() With { .a = 1, .b = .a 'a refers to the T type
/// If `allowImplicitTarget` is set to true, the returned node will be set to approperiate node, otherwise, it will return null.
/// This parameter has no affect on C# node.
/// </param>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册