PowerToys/Wox.Core/Plugin/QueryDispatcher/QueryDispatcher.cs

22 lines
630 B
C#
Raw Normal View History

2014-12-26 22:51:04 +08:00

namespace Wox.Core.Plugin.QueryDispatcher
{
internal static class QueryDispatcher
{
2015-01-24 22:34:55 +08:00
private static IQueryDispatcher regularDispatcher = new RegularPluginQueryDispatcher();
private static IQueryDispatcher wildcardDispatcher = new WildcardPluginQueryDispatcher();
2014-12-26 22:51:04 +08:00
public static void Dispatch(Wox.Plugin.Query query)
{
2015-01-23 20:49:00 +08:00
if (PluginManager.IsRegularPluginQuery(query))
2014-12-26 22:51:04 +08:00
{
2015-01-24 22:34:55 +08:00
regularDispatcher.Dispatch(query);
2014-12-26 22:51:04 +08:00
}
else
{
2015-01-24 22:34:55 +08:00
wildcardDispatcher.Dispatch(query);
2014-12-26 22:51:04 +08:00
}
}
}
}