Beispiel #1
0
        public ObservableList <OnlinePluginPackage> GetOnlinePluginsIndex()
        {
            // edit at: "https://github.com/Ginger-Automation/Ginger-Plugins-Index/blob/master/PluginsList.json";

            // raw url to get the file content
            string url = "https://raw.githubusercontent.com/Ginger-Automation/Ginger-Plugins-Index/master/PluginsList.json";
            ObservableList <OnlinePluginPackage> list             = GitHTTPClient.GetJSON <ObservableList <OnlinePluginPackage> >(url);
            ObservableList <PluginPackage>       installedPlugins = mSolutionRepository.GetAllRepositoryItems <PluginPackage>();

            foreach (OnlinePluginPackage onlinePluginPackage in list)
            {
                PluginPackage pluginPackage = (from x in installedPlugins where x.PluginId == onlinePluginPackage.Id select x).SingleOrDefault();
                if (pluginPackage != null)
                {
                    onlinePluginPackage.Status = "Installed - " + pluginPackage.PluginPackageVersion;
                }
            }
            return(list);
        }
Beispiel #2
0
 private void GetPackages()
 {
     mPluginPackages = mSolutionRepository.GetAllRepositoryItems <PluginPackage>();
 }
Beispiel #3
0
 public PluginsManager(SolutionRepository solutionRepository)
 {
     mSolutionRepository = solutionRepository;
     mPluginPackages     = solutionRepository.GetAllRepositoryItems <PluginPackage>();
 }