Added solution for executable plugins

This commit is contained in:
roose
2016-05-07 21:56:29 +06:00
committed by bao-qian
parent 11ecf20f89
commit ae121895e9
4 changed files with 61 additions and 1 deletions

View File

@@ -110,5 +110,18 @@ namespace Wox.Core.Plugin
});
return plugins;
}
public static IEnumerable<PluginPair> ExecutablePlugins(IEnumerable<PluginMetadata> source)
{
var metadatas = source.Where(o => o.Language.ToUpper() == AllowedLanguage.Executable);
var plugins = metadatas.Select(metadata => new PluginPair
{
Plugin = new ExecutablePlugin(metadata.ExecuteFilePath),
Metadata = metadata
});
return plugins;
}
}
}