2014-05-21 12:53:32 +08:00
|
|
|
|
using System.Collections.Generic;
|
2014-01-15 22:45:02 +08:00
|
|
|
|
|
2014-05-25 18:11:27 +08:00
|
|
|
|
namespace Wox.Plugin.SystemPlugins
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public abstract class BaseSystemPlugin : ISystemPlugin
|
|
|
|
|
{
|
|
|
|
|
public string PluginDirectory { get; set; }
|
|
|
|
|
public virtual string Name { get { return "System workflow"; } }
|
|
|
|
|
public virtual string Description { get { return "System workflow"; } }
|
|
|
|
|
public virtual string IcoPath { get { return null; } }
|
|
|
|
|
|
|
|
|
|
protected abstract List<Result> QueryInternal(Query query);
|
|
|
|
|
|
|
|
|
|
protected abstract void InitInternal(PluginInitContext context);
|
|
|
|
|
|
|
|
|
|
public List<Result> Query(Query query)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(query.RawQuery)) return new List<Result>();
|
|
|
|
|
return QueryInternal(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Init(PluginInitContext context)
|
|
|
|
|
{
|
|
|
|
|
InitInternal(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-05-21 12:53:32 +08:00
|
|
|
|
}
|