2014-01-26 21:18:01 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2014-01-29 18:33:24 +08:00
|
|
|
|
using Wox.Helper;
|
|
|
|
|
using Wox.Plugin;
|
2014-06-04 16:47:14 +08:00
|
|
|
|
using Wox.PluginLoader;
|
2014-01-26 21:18:01 +08:00
|
|
|
|
|
2014-01-29 18:33:24 +08:00
|
|
|
|
namespace Wox.Commands
|
2014-01-26 21:18:01 +08:00
|
|
|
|
{
|
|
|
|
|
internal static class CommandFactory
|
|
|
|
|
{
|
2014-10-22 22:49:34 +08:00
|
|
|
|
private static PluginCommand pluginCmd = new PluginCommand();
|
|
|
|
|
private static SystemCommand systemCmd = new SystemCommand();
|
2014-01-26 21:18:01 +08:00
|
|
|
|
|
2014-03-18 23:41:34 +08:00
|
|
|
|
public static void DispatchCommand(Query query)
|
2014-01-26 21:18:01 +08:00
|
|
|
|
{
|
2014-06-04 16:47:14 +08:00
|
|
|
|
if (Plugins.HitThirdpartyKeyword(query))
|
|
|
|
|
{
|
|
|
|
|
pluginCmd.Dispatch(query);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
systemCmd.Dispatch(query);
|
|
|
|
|
}
|
2014-01-26 21:18:01 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|