ISearchMatcher.cs 560 B

1234567891011121314151617181920212223
  1. using System.IO;
  2. using System.IO.Abstractions;
  3. namespace Terminal.Gui {
  4. /// <summary>
  5. /// Defines whether a given file/directory matches a set of
  6. /// search terms.
  7. /// </summary>
  8. public interface ISearchMatcher {
  9. /// <summary>
  10. /// Called once for each new search. Defines the string
  11. /// the user has provided as search terms.
  12. /// </summary>
  13. void Initialize (string terms);
  14. /// <summary>
  15. /// Return true if <paramref name="f"/> is a match to the
  16. /// last provided search terms
  17. /// </summary>
  18. bool IsMatch (IFileSystemInfo f);
  19. }
  20. }