Using MEF to simulate 'T<U> f<T, U> (T<U> input)' type generics

Jan 11, 2012 at 4:52 AM
Edited Jan 11, 2012 at 5:12 AM


I am trying to think of a way using MEF and dynamic types since MEF no longer does duck typing to simulate generics like these.  Scala has generics similar to these called Higher Kinded Generics or something similar.  Any suggestions or alternative paths you might suggest?  Thanks so much.

 

public static T<U> f<T. U>(T<U> input)
{
       return input;
}

 

After some initial reading it looks like Registration Builder may allow a type of 'duck' typing in the .NET 4.5 MEF.  Time to experiment.