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?