|
I am using MEF in my application. My application have 4 parts(class library) and a main module , the main modules responsibility is to interact with the above said parts and delegates job to them.
I have coded all the interface and abstract base classes in a library called 'Common' and refer it to all the other dlls which have classes inherit from those base classes. I moved all the base class and interface definition to the 'Common' library so that i can add reference of that dll in my main program and all the base classes and interfaces are readily available.
Is this the right way to do it? What is the other option in MEF using which i can refer to the base classes in my main module without referring to a dll.
eg:- abstract class baseAbc and interface IAbc is defined in common.dll, Is it possible to refer baseAbc and IAbc in my main module without adding reference to Common.dll
|
|
|
|
|
Disclaimer; I don't use MEF.
John T.Emmatty wrote: Is this the right way to do it?
Sounds like "yes" to me; that way you can update both common/exe without touching the other.
John T.Emmatty wrote: What is the other option in MEF using which i can refer to the base classes in my main module without referring to a dll.
Don't know if the option exists; but it "would" generate classes, and it should be possible to reference/copy those to your own assembly. I expect this is not the recommended way.
What's against having a second assembly?
|
|
|
|