private void HighlightSearchTerm() { var searchTerms = _search.CurrentSearchTerms .Distinct() .OrderBy(t => t.Length) .ToArray(); if (!searchTerms.Any()) { searchTerms = new[] { "" }; } Console.WriteLine($"{Model.Name} <- {searchTerms.Aggregate((c, n) => $"{c},{n}")}"); Name = ViewModelUtils.GetHighlightMarkup(Name, searchTerms); }
private void HighlightSearchTerm() { Name = ViewModelUtils.GetHighlightMarkup(Name, _search.FileResults.Select(r => r.Term).Distinct().OrderBy(t => t.Length).ToArray()); }