Example #1
0
        internal List <VSFileInfo> FindInProject(IVsHierarchy projectHierarchy)
        {
            var vsp4 = projectHierarchy as IVsProject4;

            if (vsp4 != null)
            {
                // use IVsProject4 if available - it is much faster than the  other mechanism, but all projects may not implement it
                FindInProjectFast(vsp4, projectHierarchy);
            }
            else
            {
                var visitor = new HierarchyVisitor(AddMatchFileInfoToResult);
                visitor.VisitHierarchy(projectHierarchy);
            }

            return(_paths);
        }
Example #2
0
        internal bool ExistInProject(IVsHierarchy projectHierarchy)
        {
            // Reset _foundMatch value.
            _foundMatch = false;

            var vsp4 = projectHierarchy as IVsProject4;

            if (vsp4 != null)
            {
                // use IVsProject4 if available - it is much faster than the other mechanism, but all projects may not implement it
                _foundMatch = ExistInProjectFast(vsp4);
            }
            else
            {
                var visitor = new HierarchyVisitor(DoesItemMatch);
                visitor.VisitHierarchy(projectHierarchy);
            }

            return(_foundMatch);
        }