Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/12/10 10:16:02 (14 years ago)
Author:
gkronber
Message:

Refreshed service reference in plugin infrastructure. #860 (Deployment server for plugin installation from web locations)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManager.cs

    r2780 r2783  
    2727using System.IO;
    2828using System.ComponentModel;
    29 using HeuristicLab.PluginInfrastructure.UpdateLocationReference;
     29using UpdateService = HeuristicLab.PluginInfrastructure.PluginUpdateService;
    3030using System.Reflection;
    3131
     
    185185      var pluginDescriptions = from name in pluginNames
    186186                               select GetPluginDescription(name);
    187       Dictionary<PluginInformation, string> matchingPlugins = new Dictionary<PluginInformation, string>();
     187      Dictionary<UpdateService.PluginDescription, string> matchingPlugins = new Dictionary<UpdateService.PluginDescription, string>();
    188188      foreach (var updateLocation in HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocations) {
    189         using (UpdateLocationClient client = new UpdateLocationClient("", updateLocation)) {
     189        using (var client = new UpdateService.UpdateClient("", updateLocation)) {
    190190          var updateLocationMatchingPlugins = from desc in pluginDescriptions
    191                                               from info in client.GetAvailablePluginsByName(desc.Name)
     191                                              from info in client.GetPlugins()
     192                                              where desc.Name == info.Name
    192193                                              select info;
    193           foreach (PluginInformation info in updateLocationMatchingPlugins) {
    194             // keep only the highest version and most recent build of any plugin
     194          foreach (UpdateService.PluginDescription info in updateLocationMatchingPlugins) {
     195            // keep only the highest version of any plugin
    195196            var existingPlugin = matchingPlugins.Keys.FirstOrDefault(x => x.Name == info.Name);
    196             if (existingPlugin == null || existingPlugin.Version < info.Version || (existingPlugin.Version == info.Version && existingPlugin.BuildDate < info.BuildDate)) {
     197            if (existingPlugin == null || existingPlugin.Version < info.Version) {
    197198              matchingPlugins.Remove(existingPlugin);
    198199              matchingPlugins.Add(info, updateLocation);
     
    206207        var groupedInfos = matchingPlugins.GroupBy(x => x.Value);
    207208        foreach (var group in groupedInfos) {
    208           using (UpdateLocationClient client = new UpdateLocationClient(group.Key)) {
     209          using (var client = new UpdateService.UpdateClient(group.Key)) {
    209210            foreach (var info in group) {
    210               client.GetPluginFiles(info.Key);
     211              client.GetPlugin(info.Key);
    211212            }
    212213          }
Note: See TracChangeset for help on using the changeset viewer.