2014-12-26 22:51:04 +08:00
|
|
|
|
|
2015-02-05 18:43:05 +08:00
|
|
|
|
using System.Threading;
|
|
|
|
|
using Wox.Plugin;
|
|
|
|
|
|
2014-12-26 22:51:04 +08:00
|
|
|
|
namespace Wox.Core.Plugin.QueryDispatcher
|
|
|
|
|
{
|
|
|
|
|
internal static class QueryDispatcher
|
|
|
|
|
{
|
2015-02-05 22:20:42 +08:00
|
|
|
|
private static readonly IQueryDispatcher exclusivePluginDispatcher = new ExclusiveQueryDispatcher();
|
|
|
|
|
private static readonly IQueryDispatcher genericQueryDispatcher = new GenericQueryDispatcher();
|
2014-12-26 22:51:04 +08:00
|
|
|
|
|
2015-02-05 22:20:42 +08:00
|
|
|
|
public static void Dispatch(Query query)
|
2014-12-26 22:51:04 +08:00
|
|
|
|
{
|
2015-02-05 22:20:42 +08:00
|
|
|
|
if (PluginManager.IsExclusivePluginQuery(query))
|
2015-02-05 18:43:05 +08:00
|
|
|
|
{
|
2015-02-05 22:20:42 +08:00
|
|
|
|
exclusivePluginDispatcher.Dispatch(query);
|
2014-12-26 22:51:04 +08:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2015-02-05 22:20:42 +08:00
|
|
|
|
genericQueryDispatcher.Dispatch(query);
|
2014-12-26 22:51:04 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|