Changeset 3178
- Timestamp:
- 03/22/10 16:50:11 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/Manager/PluginValidator.cs
r3081 r3178 143 143 ApplicationAttribute attr = (from x in appType.GetCustomAttributes(typeof(ApplicationAttribute), false) 144 144 select (ApplicationAttribute)x).Single(); 145 var declaringPlugin = GetDeclaringPlugin(appType, plugins); 145 146 ApplicationDescription info = new ApplicationDescription(); 146 147 info.Name = application.Name; 147 info.Version = appType.Assembly.GetName().Version;148 info.Version = declaringPlugin.Version; 148 149 info.Description = application.Description; 149 150 info.AutoRestart = attr.RestartOnErrors; … … 544 545 } 545 546 547 private PluginDescription GetDeclaringPlugin(Type appType, IEnumerable<PluginDescription> plugins) { 548 return (from p in plugins 549 from asmLocation in p.AssemblyLocations 550 where Path.GetFullPath(asmLocation).Equals(Path.GetFullPath(appType.Assembly.Location), StringComparison.CurrentCultureIgnoreCase) 551 select p).Single(); 552 } 553 546 554 // register assembly in the assembly cache for the ReflectionOnlyAssemblyResolveEvent 547 555 private void RegisterLoadedAssembly(Assembly asm) {
Note: See TracChangeset
for help on using the changeset viewer.