Answer the question
In order to leave comments, you need to log in
Question for XaocCPS?
There was such a topic, a continuation was promised:
habrahabr.ru/blogs/net/95809/
Enthusiasm died? :)
So I looked at the code from the article and didn’t understand one thing, the application already knows about the existence of separate modules, or what?
Who is familiar with MEF, is it possible to connect assemblies there as with the help of reflection: look at the assembly metadata, find out if there is something that interests us, and connect at runtime?
ps: I'm writing in questions, because the personal is blocked by a corporate proxy. You can redirect this question to him in a personal, I will be grateful :)
Answer the question
In order to leave comments, you need to log in
The host may not be aware of individual modules. Here's an example of how to make it look for them in the specified folder:
public Ctor()
{
var catalog = new DirectoryCatalog(@"C:\MEF\trunk\Test\Addons");
var container = new CompositionContainer(catalog);
container.SatisfyImportsOnce(this);
}
[ImportMany(typeof(IAddon))]
private IEnumerable<IAddon> Addons { get; set; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question