PowerToys/Wox.Core/Plugin/QueryDispatcher/QueryDispatcher.cs
2015-02-05 22:20:42 +08:00

25 lines
679 B
C#

using System.Threading;
using Wox.Plugin;
namespace Wox.Core.Plugin.QueryDispatcher
{
internal static class QueryDispatcher
{
private static readonly IQueryDispatcher exclusivePluginDispatcher = new ExclusiveQueryDispatcher();
private static readonly IQueryDispatcher genericQueryDispatcher = new GenericQueryDispatcher();
public static void Dispatch(Query query)
{
if (PluginManager.IsExclusivePluginQuery(query))
{
exclusivePluginDispatcher.Dispatch(query);
}
else
{
genericQueryDispatcher.Dispatch(query);
}
}
}
}