未验证 提交 7fd64389 编写于 作者: D David 提交者: GitHub

Update src/VisualStudio/LiveShare/Impl/AbstractGoToDefinitionWithFindUsagesServiceHandler.cs

Co-authored-by: NJoey Robichaud <joseph.robichaud@microsoft.com>
上级 0c4ed8cc
......@@ -51,7 +51,7 @@ public async Task<object> HandleAsync(LSP.TextDocumentPositionParams request, Re
var locations = await GetDefinitionsWithFindUsagesServiceAsync(document, position, cancellationToken).ConfigureAwait(false);
// No definition found - see if we can get metadata as source but that's only applicable for C#\VB.
if ((locations.Count() == 0) && document.SupportsSemanticModel && this._metadataAsSourceService != null)
if ((locations.Length == 0) && document.SupportsSemanticModel && this._metadataAsSourceService != null)
{
var symbol = await SymbolFinder.FindSymbolAtPositionAsync(document, position, cancellationToken).ConfigureAwait(false);
if (symbol?.Locations.FirstOrDefault().IsInMetadata == true)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册