Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 private void HighlightSearchTerm()
 {
     Name = ViewModelUtils.GetHighlightMarkup(Name, _search.FileResults.Select(r => r.Term).Distinct().OrderBy(t => t.Length).ToArray());
 }