Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/27/10 11:11:52 (14 years ago)
Author:
gkronber
Message:

Implemented an enumerable to iterate through all PluginFiles as suggested by swagner, replaced the Assemblies enumerable with an AssemblyName enumerable for internal usage in the plugin infrastructure and replaced Assembly.LoadFrom calls with Assembly.Load() to prevent loading from GAC as far as possible.

#850 (PluginInfrastructure should provide a way to get assemblies associated with a plug-in)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Manager/PluginDescription.cs

    r2666 r2688  
    2424using System.Text;
    2525using System.Linq;
     26using System.Reflection;
    2627
    2728namespace HeuristicLab.PluginInfrastructure.Manager {
     
    7778
    7879
    79     private List<string> files = new List<string>();
     80    private List<PluginFile> files = new List<PluginFile>();
    8081    /// <summary>
    8182    /// Gets the names of all files that belong to this plugin.
    8283    /// These files are deleted when the plugin is removed or updated.
    8384    /// </summary>
    84     public IEnumerable<string> Files {
    85       get { return files; }
     85    public IEnumerable<IPluginFile> Files {
     86      get { return files.Cast<IPluginFile>(); }
    8687    }
    8788
    88     internal void AddFiles(IEnumerable<string> fileNames) {
     89    internal void AddFiles(IEnumerable<PluginFile> fileNames) {
    8990      files.AddRange(fileNames);
    9091    }
     
    105106    }
    106107
    107     private List<string> assemblies = new List<string>();
     108    private List<AssemblyName> assemblyNames = new List<AssemblyName>();
    108109    /// <summary>
    109110    /// Gets the names of the assemblies that belong to this plugin.
    110111    /// </summary>
    111     public IEnumerable<string> Assemblies {
    112       get { return assemblies; }
    113       // set { assemblies = value; }
     112    public IEnumerable<AssemblyName> AssemblyNames {
     113      get { return assemblyNames; }
    114114    }
    115115
    116     internal void AddAssemblies(IEnumerable<string> assemblyNames) {
    117       assemblies.AddRange(assemblyNames);
     116    internal void AddAssemblyNames(IEnumerable<AssemblyName> assemblyNames) {
     117      this.assemblyNames.AddRange(assemblyNames);
    118118    }
    119119
Note: See TracChangeset for help on using the changeset viewer.