Exemple #1
0
        public override List<PluginPair> LoadPlugin()
        {
            List<PluginPair> plugins = new List<PluginPair>();
            List<PluginMetadata> metadatas = pluginMetadatas.Where(o => o.Language.ToUpper() == AllowedLanguage.Python.ToUpper()).ToList();
            foreach (PluginMetadata metadata in metadatas)
            {
                PythonPluginWrapper python = new PythonPluginWrapper(metadata);
                PluginPair pair = new PluginPair()
                {
                    Plugin = python,
                    Metadata = metadata
                };
                plugins.Add(pair);
            }

            return plugins;
        }
Exemple #2
0
        public override List <PluginPair> LoadPlugin()
        {
            if (!CheckPythonEnvironmentInstalled())
            {
                return(new List <PluginPair>());
            }

            List <PluginPair>     plugins   = new List <PluginPair>();
            List <PluginMetadata> metadatas = pluginMetadatas.Where(o => o.Language.ToUpper() == AllowedLanguage.Python.ToUpper()).ToList();

            foreach (PluginMetadata metadata in metadatas)
            {
                PythonPluginWrapper python = new PythonPluginWrapper(metadata);
                PluginPair          pair   = new PluginPair()
                {
                    Plugin   = python,
                    Metadata = metadata
                };
                plugins.Add(pair);
            }

            return(plugins);
        }