Tech Off Post

Single Post Permalink

View Thread: Using MEF with multiple user defined file extensions
  • User profile image
    Dr Herbie

    Not sure I understand you're question -- MEF loads DLL files (executable libraries).  MEF will load all DLLs in a given directory that have an interface marked as exported.

    If you're using MEF for syntax rules, I would expect you to have several DLLs in the same directory (one for each language supported), all exporting the same interface.  At runtime you use MEF to get a list of all the instances if found of that interface and then use the interface to interrogate each instance to see if it support the current language.

    From that point on you perform all syntax rules through that interface, using polymorphism to gloss over the fact that you don't know which specific instance you're using.