- Timestamp:
- 01/27/10 17:08:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/ApplicationManager.cs
r2688 r2690 75 75 loadedAssemblies = new Dictionary<string, Assembly>(); 76 76 loadedPlugins = new List<IPlugin>(); 77 // needed for the special case when assemblies are loaded dynamically via LoadAssemblies()78 77 AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => { 79 78 if (loadedAssemblies.ContainsKey(args.Name)) { … … 103 102 // load all loadable plugins (all dependencies available) into the execution context 104 103 foreach (var desc in PluginDescriptionIterator.IterateDependenciesBottomUp(plugins.Where(x => x.PluginState != PluginState.Disabled))) { 105 foreach ( AssemblyName assemblyName in desc.AssemblyNames) {106 var asm = Assembly.Load (assemblyName);107 104 foreach (string fileName in desc.AssemblyLocations) { 105 var asm = Assembly.LoadFrom(fileName); 106 RegisterLoadedAssembly(asm); 108 107 // instantiate and load all plugins in this assembly 109 108 foreach (var plugin in GetInstances<IPlugin>(asm)) { … … 213 212 PluginDescription pluginDesc = (PluginDescription)pluginDescription; 214 213 return from asm in AppDomain.CurrentDomain.GetAssemblies() 215 where pluginDesc.Assembly Names.Any(asmName => asmName.FullName.Equals(asm.GetName().FullName))214 where pluginDesc.AssemblyLocations.Any(location => location.Equals(Path.GetFullPath(asm.Location), StringComparison.CurrentCultureIgnoreCase)) 216 215 from t in GetTypes(type, asm, onlyInstantiable) 217 216 select t; … … 283 282 public IPluginDescription GetDeclaringPlugin(Type type) { 284 283 foreach (PluginDescription info in Plugins) { 285 if (info.Assembly Names.Contains(type.Assembly.GetName())) return info;284 if (info.AssemblyLocations.Contains(Path.GetFullPath(type.Assembly.Location))) return info; 286 285 } 287 286 return null;
Note: See TracChangeset
for help on using the changeset viewer.