mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
24 lines
775 B
C#
24 lines
775 B
C#
|
|
namespace Wox.Core.Plugin.QueryDispatcher
|
|
{
|
|
internal static class QueryDispatcher
|
|
{
|
|
private static readonly IQueryDispatcher UserPluginDispatcher = new UserPluginQueryDispatcher();
|
|
private static readonly IQueryDispatcher SystemPluginDispatcher = new SystemPluginQueryDispatcher();
|
|
|
|
public static void Dispatch(Wox.Plugin.Query query)
|
|
{
|
|
if (PluginManager.IsUserPluginQuery(query))
|
|
{
|
|
query.Search = query.RawQuery.Substring(query.RawQuery.IndexOf(' ') + 1);
|
|
UserPluginDispatcher.Dispatch(query);
|
|
}
|
|
else
|
|
{
|
|
query.Search = query.RawQuery;
|
|
SystemPluginDispatcher.Dispatch(query);
|
|
}
|
|
}
|
|
}
|
|
}
|