- Timestamp:
- 03/31/11 10:42:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/DefaultApplicationManager.cs
r5850 r5903 225 225 } 226 226 227 internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool a llTypes) {227 internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool assignableToAllTypes) { 228 228 IEnumerable<Type> result = GetTypes(types.First(), onlyInstantiable); 229 229 foreach (Type type in types.Skip(1)) { 230 230 IEnumerable<Type> discoveredTypes = GetTypes(type, onlyInstantiable); 231 if (a llTypes) result = result.Intersect(discoveredTypes);231 if (assignableToAllTypes) result = result.Intersect(discoveredTypes); 232 232 else result = result.Union(discoveredTypes); 233 233 } 234 235 if (!allTypes) return result.Distinct();236 234 return result; 237 235 } … … 255 253 } 256 254 257 internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, IPluginDescription pluginDescription, bool onlyInstantiable, bool a llTypes) {255 internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, IPluginDescription pluginDescription, bool onlyInstantiable, bool assignableToAllTypes) { 258 256 IEnumerable<Type> result = GetTypes(types.First(), pluginDescription, onlyInstantiable); 259 257 foreach (Type type in types.Skip(1)) { 260 258 IEnumerable<Type> discoveredTypes = GetTypes(type, pluginDescription, onlyInstantiable); 261 if (a llTypes) result = result.Intersect(discoveredTypes);259 if (assignableToAllTypes) result = result.Intersect(discoveredTypes); 262 260 else result = result.Union(discoveredTypes); 263 261 } 264 265 if (!allTypes) return result.Distinct();266 262 return result; 267 263 } … … 341 337 return GetTypes(type, onlyInstantiable); 342 338 } 343 IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool a llTypes) {344 return GetTypes(types, onlyInstantiable, a llTypes);339 IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool assignableToAllTypes) { 340 return GetTypes(types, onlyInstantiable, assignableToAllTypes); 345 341 } 346 342 … … 348 344 return GetTypes(type, plugin, onlyInstantiable); 349 345 } 350 IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, IPluginDescription plugin, bool onlyInstantiable, bool a llTypes) {351 return GetTypes(types, plugin, onlyInstantiable, a llTypes);346 IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, IPluginDescription plugin, bool onlyInstantiable, bool assignableToAllTypes) { 347 return GetTypes(types, plugin, onlyInstantiable, assignableToAllTypes); 352 348 } 353 349
Note: See TracChangeset
for help on using the changeset viewer.