Sorry for the late reply. Looks like the alert on the new forums is not working.
I see your point which is - the string in
Export("ButtonCaption") is just a moniker for the return type?
This sort of makes sense, because we are aiming for type safety here, as I understand.
However, I think we really don't program/ model our exports apps in terms of type, but rather in terms of the property that has a type
This will allow scenarios like the following which are very intuitive to use.
Class Foo
{
[Export]
public String ButtonCaption1{
get { return "MEF Hello World1!!"; }
}
[Export]
public String ButtonCaption1{
get { return "MEF Hello World2!!"; }
}
}
The resolved exports being Namespace.Foo.ButtonCaption1 and Namespace.Foo.ButtonCaption2.
In this case the importer can look for the specific export as well as try to use any export of the same type?
Sorry I can't see how you would allow this scenario, using the resolution scheme you point out. Do you allow 'overloading' to resolve the collision?
::Rajiv