mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
some API changes for Query class and renames.
This commit is contained in:
@@ -3,18 +3,20 @@ namespace Wox.Core.Plugin.QueryDispatcher
|
||||
{
|
||||
internal static class QueryDispatcher
|
||||
{
|
||||
private static IQueryDispatcher regularDispatcher = new RegularPluginQueryDispatcher();
|
||||
private static IQueryDispatcher wildcardDispatcher = new WildcardPluginQueryDispatcher();
|
||||
private static readonly IQueryDispatcher UserPluginDispatcher = new UserPluginQueryDispatcher();
|
||||
private static readonly IQueryDispatcher SystemPluginDispatcher = new SystemPluginQueryDispatcher();
|
||||
|
||||
public static void Dispatch(Wox.Plugin.Query query)
|
||||
{
|
||||
if (PluginManager.IsRegularPluginQuery(query))
|
||||
if (PluginManager.IsUserPluginQuery(query))
|
||||
{
|
||||
regularDispatcher.Dispatch(query);
|
||||
query.Search = query.RawQuery.Substring(query.RawQuery.IndexOf(' ') + 1);
|
||||
UserPluginDispatcher.Dispatch(query);
|
||||
}
|
||||
else
|
||||
{
|
||||
wildcardDispatcher.Dispatch(query);
|
||||
query.Search = query.RawQuery;
|
||||
SystemPluginDispatcher.Dispatch(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user