I see how to use the ExportFactory<T> to create new instances of an exported type, when the type (T) is known.
I'm wondering, what is the approach when you don't know what T is, and you have an arbitrary
Type object to construct from.
This is in a place in my code, where typically I do something like this:
var viewModel = Activator.CreateInstance(type);
However (1) that's not good when I'm using MEF, and (2) only works when the type refers to the concrete instance, not an abstract interface. So I'd like to be able to tell MEF, "please resolve one of these T's, which is probably an interface:.
How do I do that?