ICollectionNavigatorMatcher.cs 962 B

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