2014-01-15 22:45:02 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2014-01-29 18:33:24 +08:00
|
|
|
|
namespace Wox.Plugin.System
|
2014-01-15 22:45:02 +08:00
|
|
|
|
{
|
|
|
|
|
public abstract class BaseSystemPlugin :ISystemPlugin
|
|
|
|
|
{
|
|
|
|
|
protected abstract List<Result> QueryInternal(Query query);
|
|
|
|
|
protected abstract void InitInternal(PluginInitContext context);
|
|
|
|
|
|
|
|
|
|
public List<Result> Query(Query query)
|
|
|
|
|
{
|
2014-01-29 22:44:57 +08:00
|
|
|
|
if (string.IsNullOrEmpty(query.RawQuery)) return new List<Result>();
|
2014-01-15 22:45:02 +08:00
|
|
|
|
return QueryInternal(query);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Init(PluginInitContext context)
|
|
|
|
|
{
|
|
|
|
|
InitInternal(context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "System workflow";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Description
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "System workflow";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|