private async Task FindResultsInUnreferencedProjects(
            Project project, List <SymbolReference> allSymbolReferences, SymbolReferenceFinder finder, CancellationToken cancellationToken)
        {
            // If we didn't find enough hits searching just in the project, then check
            // in any unreferenced projects.
            if (allSymbolReferences.Count >= MaxResults)
            {
                return;
            }

            var viableUnreferencedProjects = GetViableUnreferencedProjects(project);

            foreach (var unreferencedProject in viableUnreferencedProjects)
            {
                // Search in this unreferenced project.  But don't search in any of its'
                // direct references.  i.e. we don't want to search in its metadata references
                // or in the projects it references itself. We'll be searching those entities
                // individually.
                AddRange(allSymbolReferences, await finder.FindInProjectAsync(unreferencedProject, includeDirectReferences: false).ConfigureAwait(false));
                if (allSymbolReferences.Count >= MaxResults)
                {
                    return;
                }
            }
        }
 private async Task FindResultsInCurrentProject(Project project, List <SymbolReference> allSymbolReferences, SymbolReferenceFinder finder)
 {
     AddRange(allSymbolReferences, await finder.FindInProjectAsync(project, includeDirectReferences: true).ConfigureAwait(false));
 }