Table of Contents

Class MostRecentlyUsedMatcher<T>

Namespace
Whim.CommandPalette
Assembly
Whim.CommandPalette.dll
MostRecentlyUsedMatcher will return matches in the order of most recently used.
public class MostRecentlyUsedMatcher<T> : IMatcher<T>

Type Parameters

T
Inheritance
MostRecentlyUsedMatcher<T>
Implements
Inherited Members

Properties

Filter

The filter to use when matching commands.
public PaletteFilter Filter { get; set; }

Property Value

PaletteFilter

Methods

LoadState(JsonElement)

Load the matcher's state from state.
public void LoadState(JsonElement state)

Parameters

state JsonElement
The matcher's state.

Match(string, IReadOnlyList<IVariantRowModel<T>>)

Matcher returns an ordered list of filtered matches for the query.
public IEnumerable<MatcherResult<T>> Match(string query, IReadOnlyList<IVariantRowModel<T>> inputItems)

Parameters

query string
inputItems IReadOnlyList<IVariantRowModel<T>>

Returns

IEnumerable<MatcherResult<T>>

OnMatchExecuted(IVariantRowModel<T>)

Called when a match has been executed. This is used by the IMatcher<TData> implementation to update relevant internal state.
public void OnMatchExecuted(IVariantRowModel<T> item)

Parameters

item IVariantRowModel<T>

SaveState()

Save the matcher's state as a JsonElement.
public JsonElement? SaveState()

Returns

JsonElement?
The matcher's state.