Skip to content

Core Search & Action Plugins

These interfaces define plugin modules directly associated with SwiftList's core search capabilities, item indexing, and action execution.


1. IPlugin & IActionProvider

The core interface has been refactored into cleaner, single-responsibility definitions: IPlugin as the base identifier for all plugins, and IActionProvider to optionally expose search actions.

csharp
public interface IPlugin
{
    string Name { get; }
}

public interface IActionProvider
{
    IEnumerable<ISearchResultAction> GetActions();
    IEnumerable<IDynamicActionProvider> GetDynamicProviders();
}
  • IPlugin: The base interface for all plugins, containing the localized plugin Name.
  • IActionProvider: Implemented when the plugin extends search result context menus or responds to double-clicks/hotkey execution.
    • GetActions(): Returns a list of static actions provided by this plugin (each must implement the ISearchResultAction interface).
    • GetDynamicProviders(): Returns a list of dynamic action providers (e.g. Shell Context Menu, which must implement the IDynamicActionProvider interface).

2. IAliasProvider (Alias Resolver)

Generates initials, Pinyin, or customized lookup aliases for non-ASCII text to enable smarter fuzzy search.

csharp
public interface IAliasProvider
{
    string Name { get; }
    IEnumerable<string> GetAliases(string text);
}
  • GetAliases(string text): Returns a collection of search aliases calculated for a file or item title.

3. IInstantResultProvider (Instant Result calculation)

Calculates and renders instant results directly in the query box (e.g., typing =1+1 displays 2, or >cmd runs terminal actions).

csharp
public interface IInstantResultProvider
{
    string Id { get; }
    string Name { get; }
    string Description { get; }
    bool CanProvide(string query);
    IEnumerable<ISearchResult> GetResults(string query);
}
  • CanProvide: Determines whether this provider handles the query pattern.
  • GetResults: Synchronously returns instant results.

4. ISearchableItemProvider (Custom Databases)

Registers custom items into the global search index (e.g. system settings, browser bookmarks).

csharp
public interface ISearchableItemProvider
{
    string Name { get; }
    bool EnableAlias => true;
    IEnumerable<SearchableItem> GetSearchableItems();
}
  • GetSearchableItems(): Returns searchable items which are cached and indexed at main application startup.