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

24 lines
775 B
C#
Raw Normal View History

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

namespace Wox.Core.Plugin.QueryDispatcher
{
internal static class QueryDispatcher
{
private static readonly IQueryDispatcher UserPluginDispatcher = new UserPluginQueryDispatcher();
private static readonly IQueryDispatcher SystemPluginDispatcher = new SystemPluginQueryDispatcher();
2014-12-26 22:51:04 +08:00
public static void Dispatch(Wox.Plugin.Query query)
{
if (PluginManager.IsUserPluginQuery(query))
2014-12-26 22:51:04 +08:00
{
query.Search = query.RawQuery.Substring(query.RawQuery.IndexOf(' ') + 1);
UserPluginDispatcher.Dispatch(query);
2014-12-26 22:51:04 +08:00
}
else
{
query.Search = query.RawQuery;
SystemPluginDispatcher.Dispatch(query);
2014-12-26 22:51:04 +08:00
}
}
}
}