public override ICollection<IOccurence> Search(IProgressIndicator progressIndicator) { // Create and configure utility class, which will perform search var searcher = new StringSearcher(mySearchString, myCaseSensitive); // Fetch all projects for solution, start progress ICollection<IProject> projects = Solution.GetAllProjects(); progressIndicator.Start(projects.Count); var items = new List<IOccurence>(); // visit each project and collect occurences var visitor = new ProjectTextSearcher(searcher, items, mySearchFlags, myDocumentManager, mySolution); foreach (IProject project in projects) { progressIndicator.CurrentItemText = string.Format("Scanning project '{0}'", project.Name); project.Accept(visitor); progressIndicator.Advance(1); } return items; }
public override ICollection <IOccurence> Search(IProgressIndicator progressIndicator) { // Create and configure utility class, which will perform search var searcher = new StringSearcher(mySearchString, myCaseSensitive); // Fetch all projects for solution, start progress ICollection <IProject> projects = Solution.GetAllProjects(); progressIndicator.Start(projects.Count); var items = new List <IOccurence>(); // visit each project and collect occurences var visitor = new ProjectTextSearcher(searcher, items, mySearchFlags, myDocumentManager, mySolution); foreach (IProject project in projects) { progressIndicator.CurrentItemText = string.Format("Scanning project '{0}'", project.Name); project.Accept(visitor); progressIndicator.Advance(1); } return(items); }