Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/17/10 23:27:03 (14 years ago)
Author:
swagner
Message:

Enabled application managers to discover generic types (#1015)

File:
1 edited

Legend:

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

    r3821 r3828  
    242242             where CheckTypeCompatibility(type, t)
    243243             where onlyInstantiable == false || (!t.IsAbstract && !t.IsInterface && !t.HasElementType)
    244              select BuildType(type, t);
     244             select BuildType(t, type);
    245245    }
    246246
     
    256256      return false;
    257257    }
    258     private static Type BuildType(Type type, Type other) {
    259       if (type.IsGenericType && other.IsGenericType)
    260         return other.GetGenericTypeDefinition().MakeGenericType(type.GetGenericArguments());
     258    private static Type BuildType(Type type, Type protoType) {
     259      if (type.IsGenericType && protoType.IsGenericType)
     260        return type.GetGenericTypeDefinition().MakeGenericType(protoType.GetGenericArguments());
    261261      else
    262         return other;
     262        return type;
    263263    }
    264264
Note: See TracChangeset for help on using the changeset viewer.