Suppose I have a generic class called MyClass<T> how can I create a JavascriptConverter that will be used for any T possible (be it MyClass<OtherClass>, MyClass<SimpleClass>)?
I tried to to the following in my converter:
public Enumerable<Type> SupportedTypes
{
get
{
return new List<Type>(){ typeof(MyClass<>) };
}
}
But to no avail.
Any ideas? is this possible?
If not, is there any other way to acheive the same result?
If you really want this, with no filters at all:
It gets all loaded assemblies, then all types for those assemblies, then filters according to your generic where conditions, finally it makes a concrete generic type from your class and the type.