Changeset 6901
- Timestamp:
- 10/11/11 19:17:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/PluginLoader.cs
r6866 r6901 42 42 catch (BadImageFormatException) { } 43 43 } 44 Assemblies = AppDomain.CurrentDomain.GetAssemblies().ToList(); 44 // test relevant path again to exclude previously loaded assemblies 45 Assemblies = AppDomain.CurrentDomain.GetAssemblies() 46 .Where(asm => IsRelevantAssemblyPath(asm.Location)) 47 .ToList(); 45 48 } 46 49 47 50 private static bool IsRelevantAssemblyPath(string path) { 48 51 bool valid = true; 49 valid = valid && (path.EndsWith(ExecutableExtension, StringComparison.OrdinalIgnoreCase) || path.EndsWith(AssemblyExtension, StringComparison.OrdinalIgnoreCase));52 valid = valid && path.EndsWith(ExecutableExtension, StringComparison.OrdinalIgnoreCase) || path.EndsWith(AssemblyExtension, StringComparison.OrdinalIgnoreCase); 50 53 valid = valid && !path.EndsWith(TestAccessorAssemblyExtension, StringComparison.OrdinalIgnoreCase) && !path.EndsWith(TestAssemblyExtension, StringComparison.OrdinalIgnoreCase); 51 54 return valid;
Note: See TracChangeset
for help on using the changeset viewer.