// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Immutable;
usingSystem.Linq;
usingSystem.Threading;
usingSystem.Threading.Tasks;
usingMicrosoft.CodeAnalysis.FindSymbols;
usingMicrosoft.CodeAnalysis.FindUsages;
usingMicrosoft.CodeAnalysis.LanguageServices;
usingMicrosoft.CodeAnalysis.Shared.Extensions;
usingRoslyn.Utilities;
namespaceMicrosoft.CodeAnalysis.Editor.FindUsages
{
...
...
@@ -44,36 +47,60 @@ public async Task FindImplementationsAsync(Document document, int position, IFin
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Immutable;
usingSystem.Linq;
usingSystem.Threading;
usingMicrosoft.CodeAnalysis.FindSymbols;
usingMicrosoft.CodeAnalysis.Navigation;
usingRoslyn.Utilities;
namespaceMicrosoft.CodeAnalysis.FindUsages
{
...
...
@@ -11,25 +17,111 @@ internal partial class DefinitionItem
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Immutable;
namespaceMicrosoft.CodeAnalysis.FindUsages
{
internalpartialclassDefinitionItem
{
/// <summary>
/// Implementation of a <see cref="DefinitionItem"/> used for definitions
/// that cannot be navigated to. For example, C# and VB namespaces cannot be
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Immutable;
usingSystem.Linq;
usingSystem.Threading;
usingMicrosoft.CodeAnalysis.FindSymbols;
usingMicrosoft.CodeAnalysis.Navigation;
usingRoslyn.Utilities;
namespaceMicrosoft.CodeAnalysis.FindUsages
{
internalpartialclassDefinitionItem
{
/// <summary>
/// Implementation of a <see cref="DefinitionItem"/> that sits on top of an
/// <see cref="ISymbol"/>. In order to not keep anything alive too long, we only
/// hold onto IDs and Keys. When the user tries to navigate to an item we will
/// attempt to find the symbol again in the current solution snapshot and
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Immutable;
namespaceMicrosoft.CodeAnalysis.FindReferences
{
internalpartialclassDefinitionLocation
{
/// <summary>
/// Implementation of a <see cref="DefinitionLocation"/> that sits on top of a
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Collections.Immutable;
usingSystem.Linq;
usingSystem.Threading;
...
...
@@ -37,11 +35,12 @@ public async Task<Document> GetEditAsync(CancellationToken cancellationToken)
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
<value>Unfortunately, a process used by Visual Studio has encountered an unrecoverable error. We recommend saving your work, and then closing and restarting Visual Studio.</value>
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
WpfTestCase.RequireWpfFact($"The {NameOf(Implementation.Library.FindResults.LibraryManager)} assumes it's on the VS UI thread and thus uses WaitAndGetResult")
Assert.True(expectedResults.Count=findReferencesTree.Count,$"Unexpected number of results. Expected: {expectedResults.Count} Actual: {findReferencesTree.Count}