Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/24/11 14:49:35 (13 years ago)
Author:
mkommend
Message:

#1689: Filtered generic type definitions if only instantiable types should be discovered.

Location:
trunk/sources/HeuristicLab.PluginInfrastructure/3.3
Files:
2 edited

Legend:

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

    r5903 r7066  
    125125
    126126        return from t in assemblyTypes
     127               where !IsNonDiscoverableType(t)
    127128               where CheckTypeCompatibility(type, t)
    128                where onlyInstantiable == false || (!t.IsAbstract && !t.IsInterface && !t.HasElementType)
    129                where !IsNonDiscoverableType(t)
     129               where onlyInstantiable == false || (!t.IsAbstract && !t.IsInterface && !t.HasElementType && !t.IsGenericTypeDefinition)
    130130               select BuildType(t, type);
    131131      }
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs

    r6538 r7066  
    263263    private static IEnumerable<Type> GetTypes(Type type, Assembly assembly, bool onlyInstantiable) {
    264264      return from t in assembly.GetTypes()
     265             where !IsNonDiscoverableType(t)
    265266             where CheckTypeCompatibility(type, t)
    266267             where onlyInstantiable == false ||
    267                 (!t.IsAbstract && !t.IsInterface && !t.HasElementType)
    268              where !IsNonDiscoverableType(t)
     268                (!t.IsAbstract && !t.IsInterface && !t.HasElementType && !t.IsGenericTypeDefinition)
    269269             select BuildType(t, type);
    270270    }
Note: See TracChangeset for help on using the changeset viewer.