Add Executable Plugin Loader

This commit is contained in:
qianlifeng
2014-07-05 23:10:34 +08:00
parent f01de3a69d
commit 659ff866e1
17 changed files with 850 additions and 542 deletions

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wox.Plugin;
namespace Wox.PluginLoader
{
public class ExecutablePluginLoader : BasePluginLoader
{
public override List<PluginPair> LoadPlugin()
{
List<PluginPair> plugins = new List<PluginPair>();
List<PluginMetadata> metadatas = pluginMetadatas.Where(o => o.Language.ToUpper() == AllowedLanguage.ExecutableFile.ToUpper()).ToList();
foreach (PluginMetadata metadata in metadatas)
{
ExecutablePluginWrapper executer = new ExecutablePluginWrapper();
PluginPair pair = new PluginPair()
{
Plugin = executer,
Metadata = metadata
};
plugins.Add(pair);
}
return plugins;
}
}
}