Class PaletteFilters
- Namespace
 - Whim.CommandPalette
 
- Assembly
 - Whim.CommandPalette.dll
 
Utilities for palette filters.
  
  public static class PaletteFilters
  - Inheritance
 - 
      
      PaletteFilters
 
- Inherited Members
 
Fields
MatchesFuzzyContiguous
Filter which returns contiguous matches of a word, compared to a given word to match against.
  
  public static readonly PaletteFilter MatchesFuzzyContiguous
  Field Value
MatchesFuzzySeparate
Filter which returns separate matches of a word, compared to a given word to match against.
  
  public static readonly PaletteFilter MatchesFuzzySeparate
  Field Value
MatchesWords
Filter which returns prefix, separate words, and contiguous string matches of a word, compared to a given word to match against.
  
  public static readonly PaletteFilter MatchesWords
  Field Value
Methods
Join(FilterTextMatch, FilterTextMatch[])
Returns an array with the tail concatenated to the end of the head.
NOTE: This may mutate the provided tail.
  
  public static FilterTextMatch[] Join(FilterTextMatch head, FilterTextMatch[] tail)
  Parameters
headFilterTextMatch- The match to place at the start of the array of returned matches.
 tailFilterTextMatch[]- The matches to place after the head.
 
Returns
MatchesCamelCase(string, string)
Returns the matches for the word, where the word is a camel case substring of the wordToMatchAgainst.
  
  public static FilterTextMatch[]? MatchesCamelCase(string word, string wordToMatchAgainst)
  Parameters
Returns
MatchesContiguousSubString(string, string)
Returns the match of the word, where the word is a contiguous substring of the wordToMatchAgainst.
  
  public static FilterTextMatch[]? MatchesContiguousSubString(string word, string wordToMatchAgainst)
  Parameters
Returns
MatchesPrefix(string, string)
Returns exact prefix matches of the word, compared to the wordToMatchAgainst.
Cases are ignored.
  
  public static FilterTextMatch[]? MatchesPrefix(string word, string wordToMatchAgainst)
  Parameters
Returns
MatchesRegex(string, string)
Returns matches of the word compared to the wordToMatchAgainst, where the word is a regular expression.
  
  public static FilterTextMatch[]? MatchesRegex(string word, string wordToMatchAgainst)
  Parameters
Returns
MatchesStrictPrefix(string, string)
Returns prefix matches of the word, compared to the wordToMatchAgainst.
Cases are matched exactly.
  
  public static FilterTextMatch[]? MatchesStrictPrefix(string word, string wordToMatchAgainst)
  Parameters
Returns
MatchesSubString(string, string)
Returns the non-contiguous substring matches of the word, compared to the wordToMatchAgainst.
  
  public static FilterTextMatch[]? MatchesSubString(string word, string wordToMatchAgainst)
  Parameters
Returns
MatchesWordsContiguous(string, string)
Matches beginning of words supporting non-ASCII languages.
Matches substrings of the word with beginnings of the words in the target. E.g., "gp" or "g p" will match "Git: Pull".
Useful in cases where the target is words (e.g., command labels).
  
  public static FilterTextMatch[]? MatchesWordsContiguous(string word, string target)
  Parameters
Returns
MatchesWordsSeparate(string, string)
Matches beginning of words supporting non-ASCII languages.
Matches words with the beginnings of the words in the target. E.g., "pul" will match "Git: Pull".
  
  public static FilterTextMatch[]? MatchesWordsSeparate(string word, string target)
  Parameters
Returns
Or(params PaletteFilter[])
Returns a filter which returns the matches for the first filter which returns a
non-null value.
  
  public static PaletteFilter Or(params PaletteFilter[] filters)
  Parameters
filtersPaletteFilter[]- The filters to iterate over.