Changeset 5903 for trunk/sources/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs
- Timestamp:
- 03/31/11 10:42:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs
r5850 r5903 89 89 /// (interfaces, abstract classes... are not returned)</remarks> 90 90 /// <returns>Enumerable of the discovered types.</returns> 91 public IEnumerable<Type> GetTypes(IEnumerable<Type> types, bool onlyInstantiable = true, bool a llTypes = true) {91 public IEnumerable<Type> GetTypes(IEnumerable<Type> types, bool onlyInstantiable = true, bool assignableToAllTypes = true) { 92 92 IEnumerable<Type> result = GetTypes(types.First(), onlyInstantiable); 93 93 foreach (Type type in types.Skip(1)) { 94 94 IEnumerable<Type> discoveredTypes = GetTypes(type, onlyInstantiable); 95 if (a llTypes) result = result.Intersect(discoveredTypes);95 if (assignableToAllTypes) result = result.Intersect(discoveredTypes); 96 96 else result = result.Union(discoveredTypes); 97 97 } 98 99 if (!allTypes) return result.Distinct();100 98 return result; 101 99 } … … 194 192 /// <returns></returns> 195 193 /// <throws>NotSupportedException</throws> 196 public IEnumerable<Type> GetTypes(IEnumerable<Type> types, IPluginDescription plugin, bool onlyInstantiable = true, bool a llTypes = true) {194 public IEnumerable<Type> GetTypes(IEnumerable<Type> types, IPluginDescription plugin, bool onlyInstantiable = true, bool assignableToAllTypes = true) { 197 195 throw new NotSupportedException("LightweightApplicationManager doesn't support type discovery for plugins."); 198 196 }
Note: See TracChangeset
for help on using the changeset viewer.