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 HashSet<IDependency> SearchFlat(
            string projectPath,
            string searchTerm,
            IGraphContext graphContext,
            IDependenciesSnapshot dependenciesSnapshot)
        {
            var matchedDependencies = new HashSet<IDependency>();
            foreach (var targetedSnapshot in dependenciesSnapshot.Targets)
            {
                foreach (var dependency in targetedSnapshot.Value.DependenciesWorld)
                {
                    if (dependency.Value.Visible && dependency.Value.Caption.ToLowerInvariant().Contains(searchTerm))
                    {
                        matchedDependencies.Add(dependency.Value);
                    }
                }
            }
            return matchedDependencies;
        }
private HashSet < IDependency > SearchFlat ( string projectPath , string searchTerm , IGraphContext graphContext , IDependenciesSnapshot dependenciesSnapshot ) { var matchedDependencies = new HashSet < IDependency > ( ) ; foreach ( var targetedSnapshot in dependenciesSnapshot . Targets ) { foreach ( var dependency in targetedSnapshot . Value . DependenciesWorld ) { if ( dependency . Value . Visible && dependency . Value . Caption . ToLowerInvariant ( ) . Contains ( searchTerm ) ) { matchedDependencies . Add ( dependency . Value ) ; } } } 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 .
projectPath
string
searchTerm
string
graphContext
IGraphContext
dependenciesSnapshot
IDependenciesSnapshot