Thanks for the answer :)
But when you say: "The ability to access or allow access should be the part of the class."
Do you mean the "host" or the "part" class?
What I specifically mean is that, if a part (externally developed) writes something such as:
how can I avoid that this instantiates an object for each class in the catalog that export "IMessageSender"?
Imagine that in the catalog there are 10 parts that export such an interface, but in that moment I want only 5 of these to be available (maybe because previously "activated" by the main app).
So, in a similar scenario, is it possible to "decide" (at host level) what "exports" a part can use?
I thought about building an "ad-hoc" catalog, but then what happen if I want to remove a shared instance? I read that in that situation the only way is to dispose the container, but if I do that, then all the instances created by this container
will be disposed (and not only the one that I would like to remove), is this correct?