Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12644


Ignore:
Timestamp:
07/07/15 13:54:27 (9 years ago)
Author:
ascheibe
Message:

#2409 simplified IProgrammableItem discovery

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/Util/PluginUtil.cs

    r12621 r12644  
    2626using System.Security.Cryptography;
    2727using System.ServiceModel;
    28 using HeuristicLab.Common;
    2928using HeuristicLab.Core;
    3029using HeuristicLab.PluginInfrastructure;
     
    4140    /// <param name="neededPlugins">List of plugins which need to be uploaded</param>
    4241    /// <returns></returns>
    43     public static List<Guid> GetPluginDependencies(IHiveService service, List<Plugin> onlinePlugins, List<Plugin> alreadyUploadedPlugins, IEnumerable<IPluginDescription> neededPlugins) {
     42    public static List<Guid> GetPluginDependencies(IHiveService service, List<Plugin> onlinePlugins, List<Plugin> alreadyUploadedPlugins,
     43                                                   IEnumerable<IPluginDescription> neededPlugins) {
    4444      var pluginIds = new List<Guid>();
    4545      Dictionary<IPluginDescription, byte[]> checksumsNeededPlugins = CalcChecksumsForPlugins(neededPlugins);
     
    9595
    9696    public static List<IPluginDescription> GetPluginsForTask(IEnumerable<Type> usedTypes, object task) {
    97       if (task.GetObjectGraphObjects().Any(x => typeof(IProgrammableItem).IsInstanceOfType(x))) {
     97      if (usedTypes.Any(x => x.GetInterfaces().Any(y => y == typeof(IProgrammableItem)))) {
    9898        //when a programmable item is used all plugins that are currently loaded need to be sent to Hive
    9999        return ApplicationManager.Manager.Plugins.ToList();
Note: See TracChangeset for help on using the changeset viewer.