2
0

ICollectionNavigatorMatcher.cs 955 B

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