PowerToys/WinAlfred/Commands/CommandDispatcher.cs
2014-01-03 18:16:05 +08:00

32 lines
849 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WinAlfred.Helper;
using WinAlfred.Plugin;
namespace WinAlfred.Commands
{
public class CommandDispatcher
{
private PluginCommand pluginCmd = new PluginCommand();
private SystemCommand systemCmd = new SystemCommand();
//public delegate void resultUpdateDelegate(List<Result> results);
//public event resultUpdateDelegate OnResultUpdateEvent;
//protected virtual void OnOnResultUpdateEvent(List<Result> list)
//{
// resultUpdateDelegate handler = OnResultUpdateEvent;
// if (handler != null) handler(list);
//}
public void DispatchCommand(Query query)
{
systemCmd.Dispatch(query);
pluginCmd.Dispatch(query);
}
}
}