public void Run() { try { var searcher = new FilterSearcher(filter, searchComparer, AddResult, language, cts.Token); searcher.SearchAssemblies(asmNodes); } catch (OperationCanceledException) { // ignore cancellation } // remove the 'Searching…' entry dispatcher.BeginInvoke( DispatcherPriority.Normal, new Action(delegate { this.Results.RemoveAt(this.Results.Count - 1); })); }
public void Run() { try { var searcher = new FilterSearcher(filter, searchComparer, AddResult, language, cts.Token); searcher.SearchAssemblies(asmNodes); } catch (OperationCanceledException) { // ignore cancellation } dispatcher.BeginInvoke( DispatcherPriority.Normal, new Action(() => { // remove the 'Searching...' entry this.Results.RemoveAt(this.Results.Count - 1); if (OnSearchEnded != null) { OnSearchEnded(this, EventArgs.Empty); } }) ); }