提交 b1ba4006 编写于 作者: C Cyrus Najmabadi

The desired name for an attribute in an attribute context should not have hte attribute suffix.

上级 b172abe1
......@@ -474,8 +474,10 @@ private async Task<IList<SymbolReference>> GetMatchingTypesAsync(SearchScope sea
// also lookup type symbols with the "Attribute" suffix.
if (inAttributeContext)
{
var attributeSymbols = await searchScope.FindDeclarationsAsync(name + "Attribute", SymbolFilter.Type).ConfigureAwait(false);
symbols = symbols.Concat(
await searchScope.FindDeclarationsAsync(name + "Attribute", SymbolFilter.Type).ConfigureAwait(false));
attributeSymbols.Select(r => r.WithDesiredName(r.DesiredName.GetWithoutAttributeSuffix(isCaseSensitive: false))));
}
return OfType<ITypeSymbol>(symbols);
......@@ -749,6 +751,11 @@ public SearchResult(string desiredName, T symbol, double weight)
{
return new SearchResult<T2>(this.DesiredName, symbol, this.Weight);
}
internal SearchResult<T> WithDesiredName(string desiredName)
{
return new SearchResult<T>(desiredName, Symbol, Weight);
}
}
private struct SearchResult
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册