src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/GraphNodes/Actions/SearchGraphActionHandler.cs
/// <summary>
/// Does flat search among dependency world lists to find any dependencies that match search criteria.
/// </summary>
Does flat search among dependency world lists to find any dependencies that match search criteria.
Does flat search among dependency world lists to find any dependencies that match search criteria .
private static HashSet<IDependency> SearchFlat(string searchTerm, DependenciesSnapshot dependenciesSnapshot)
        {
            var matchedDependencies = new HashSet<IDependency>(DependencyIdComparer.Instance);
            foreach ((ITargetFramework _, TargetedDependenciesSnapshot targetedSnapshot) in dependenciesSnapshot.DependenciesByTargetFramework)
            {
                foreach ((string _, IDependency dependency) in targetedSnapshot.DependenciesWorld)
                {
                    if (dependency.Visible && dependency.Caption.IndexOf(searchTerm, StringComparisons.UserEnteredSearchTermIgnoreCase) != -1)
                    {
                        matchedDependencies.Add(dependency);
                    }
                }
            }
            return matchedDependencies;
        }
private static HashSet < IDependency > SearchFlat ( string searchTerm , DependenciesSnapshot dependenciesSnapshot ) { var matchedDependencies = new HashSet < IDependency > ( DependencyIdComparer . Instance ) ; foreach ( ( ITargetFramework _ , TargetedDependenciesSnapshot targetedSnapshot ) in dependenciesSnapshot . DependenciesByTargetFramework ) { foreach ( ( string _ , IDependency dependency ) in targetedSnapshot . DependenciesWorld ) { if ( dependency . Visible && dependency . Caption . IndexOf ( searchTerm , StringComparisons . UserEnteredSearchTermIgnoreCase ) != - 1 ) { matchedDependencies . Add ( dependency ) ; } } } return matchedDependencies ; }
Does flat search among dependency world lists to find any dependencies that match search criteria.
Does flat search among dependency world lists to find any dependencies that match search criteria .
searchTerm
string
dependenciesSnapshot
DependenciesSnapshot