Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/31/11 10:42:06 (13 years ago)
Author:
gkronber
Message:

#1454: renamed parameter and minor changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/DefaultApplicationManager.cs

    r5850 r5903  
    225225    }
    226226
    227     internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool allTypes) {
     227    internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool assignableToAllTypes) {
    228228      IEnumerable<Type> result = GetTypes(types.First(), onlyInstantiable);
    229229      foreach (Type type in types.Skip(1)) {
    230230        IEnumerable<Type> discoveredTypes = GetTypes(type, onlyInstantiable);
    231         if (allTypes) result = result.Intersect(discoveredTypes);
     231        if (assignableToAllTypes) result = result.Intersect(discoveredTypes);
    232232        else result = result.Union(discoveredTypes);
    233233      }
    234 
    235       if (!allTypes) return result.Distinct();
    236234      return result;
    237235    }
     
    255253    }
    256254
    257     internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, IPluginDescription pluginDescription, bool onlyInstantiable, bool allTypes) {
     255    internal static IEnumerable<Type> GetTypes(IEnumerable<Type> types, IPluginDescription pluginDescription, bool onlyInstantiable, bool assignableToAllTypes) {
    258256      IEnumerable<Type> result = GetTypes(types.First(), pluginDescription, onlyInstantiable);
    259257      foreach (Type type in types.Skip(1)) {
    260258        IEnumerable<Type> discoveredTypes = GetTypes(type, pluginDescription, onlyInstantiable);
    261         if (allTypes) result = result.Intersect(discoveredTypes);
     259        if (assignableToAllTypes) result = result.Intersect(discoveredTypes);
    262260        else result = result.Union(discoveredTypes);
    263261      }
    264 
    265       if (!allTypes) return result.Distinct();
    266262      return result;
    267263    }
     
    341337      return GetTypes(type, onlyInstantiable);
    342338    }
    343     IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool allTypes) {
    344       return GetTypes(types, onlyInstantiable, allTypes);
     339    IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, bool onlyInstantiable, bool assignableToAllTypes) {
     340      return GetTypes(types, onlyInstantiable, assignableToAllTypes);
    345341    }
    346342
     
    348344      return GetTypes(type, plugin, onlyInstantiable);
    349345    }
    350     IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, IPluginDescription plugin, bool onlyInstantiable, bool allTypes) {
    351       return GetTypes(types, plugin, onlyInstantiable, allTypes);
     346    IEnumerable<Type> IApplicationManager.GetTypes(IEnumerable<Type> types, IPluginDescription plugin, bool onlyInstantiable, bool assignableToAllTypes) {
     347      return GetTypes(types, plugin, onlyInstantiable, assignableToAllTypes);
    352348    }
    353349
Note: See TracChangeset for help on using the changeset viewer.