void ISearchManagerInternal.OnResultChanged(ISearchResult rslt, SearchResultChangeFlag flags) { if ((flags & SearchResultChangeFlag.StatusChanged) != 0 || (flags & SearchResultChangeFlag.VisibleChanged) != 0) { combinedResultUpdateInvoker.Invoke(); } if ((flags & SearchResultChangeFlag.ResultsCollectionChanged) != 0 || (flags & SearchResultChangeFlag.HitCountChanged) != 0) { combinedResultNeedsLazyUpdateFlag.Invalidate(); } SearchResultChanged?.Invoke(rslt, new SearchResultChangeEventArgs(flags)); }
void ISearchManagerInternal.OnResultChanged(ISearchResult rslt, SearchResultChangeFlag flags) { if ((flags & SearchResultChangeFlag.StatusChanged) != 0 || (flags & SearchResultChangeFlag.VisibleChanged) != 0) { combinedResultUpdateInvoker.Invoke(); } if ((flags & SearchResultChangeFlag.ResultsCollectionChanged) != 0 || (flags & SearchResultChangeFlag.HitCountChanged) != 0) { combinedResultUpdateInvoker.Invoke(TimeSpan.FromMilliseconds(300)); } SearchResultChanged?.Invoke(rslt, new SearchResultChangeEventArgs(flags)); changeNotification.Post(); }
private void updateSearchResult() { if (!string.IsNullOrWhiteSpace(_currentText)) { var query = _searcher.GetQuery(_currentText); var searchResult = _searcher.Search(query); SearchResult = new FixedSearchResult(searchResult); } else { SearchResult = FixedSearchResult.Empty; } SearchResultChanged?.Invoke(this, SearchResult); }