ICollectionNavigatorMatcher.cs 980 B

12345678910111213141516171819202122232425262728
  1. #nullable disable
  2. 
  3. namespace Terminal.Gui.Views;
  4. /// <summary>
  5. /// Determines which keys trigger collection manager navigation
  6. /// and how to match typed strings to objects in the collection.
  7. /// Default implementation is <see cref="DefaultCollectionNavigatorMatcher"/>.
  8. /// </summary>
  9. public interface ICollectionNavigatorMatcher
  10. {
  11. /// <summary>
  12. /// Returns true if <paramref name="key"/> is key searchable key (e.g. letters, numbers, etc) that are valid to pass
  13. /// to this class for search filtering.
  14. /// </summary>
  15. /// <param name="key"></param>
  16. /// <returns></returns>
  17. bool IsCompatibleKey (Key key);
  18. /// <summary>
  19. /// Return true if the <paramref name="value"/> matches (e.g. starts with)
  20. /// the <paramref name="search"/> term.
  21. /// </summary>
  22. /// <param name="search"></param>
  23. /// <param name="value"></param>
  24. /// <returns></returns>
  25. bool IsMatch (string search, object value);
  26. }