mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Refactoring.
This commit is contained in:
21
Wox.Core/Plugin/QueryDispatcher/QueryDispatcher.cs
Normal file
21
Wox.Core/Plugin/QueryDispatcher/QueryDispatcher.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
namespace Wox.Core.Plugin.QueryDispatcher
|
||||
{
|
||||
internal static class QueryDispatcher
|
||||
{
|
||||
private static IQueryDispatcher pluginCmd = new UserPluginQueryDispatcher();
|
||||
private static IQueryDispatcher systemCmd = new SystemPluginQueryDispatcher();
|
||||
|
||||
public static void Dispatch(Wox.Plugin.Query query)
|
||||
{
|
||||
if (PluginManager.IsUserPluginQuery(query))
|
||||
{
|
||||
pluginCmd.Dispatch(query);
|
||||
}
|
||||
else
|
||||
{
|
||||
systemCmd.Dispatch(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user