Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/13/08 16:50:18 (16 years ago)
Author:
gkronber
Message:

implemented #339 (Persist meta-information about required plugins in all documents)
old documents can still be loaded new documents have a list of necessary plugins at the top XML.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/DiscoveryService.cs

    r29 r750  
    117117      return types.ToArray();
    118118    }
     119
     120    public PluginInfo GetDeclaringPlugin(Type type) {
     121      IPlugin[] plugins = GetInstances<IPlugin>(type.Assembly);
     122      if(plugins.Length != 1) return null;
     123      IPlugin plugin = plugins[0];
     124      foreach(PluginInfo info in PluginManager.Manager.LoadedPlugins) {
     125        if(info.Name == plugin.Name && info.Version == plugin.Version) return info;
     126      }
     127      return null;
     128    }
    119129  }
    120130}
Note: See TracChangeset for help on using the changeset viewer.