C # plugin template

Problem:
I create a structure that accepts a file, translates , and executes . The structure should be able to process files of any type, for this purpose I have provided a method for loading classes and methods containing DLLs for translating and executing a file. What I'm looking for is the best way to define a plugin interface

Solution A:
Define a set of interfaces that are publicly available. Plugins must implement these interfaces.

Solution B:
Define some abstract classes that are publicly available. Plugins must inherit and override the abstract methods of these classes.

Solution C: rcravens
Skip the interfaces inside the code, create an abstract class that is publicly available to extend the extensibility of the plugin. Favorite
This solution was chosen in front of the interface only because it provides a basic implementation (in this case it is convenient). It was chosen ahead of the abstract class only because it allows you to taunt inside the code. The composition borders are excellent, but slightly above the top for something as light as this app, where only limited extensibility is required.

Solution D: Jay and Chris Shain
Implement a layout structure (e.g. Managed Extensibility Framework (MEF) ) and build around it

- , . , (, )

,

+5
3

, . . . , , . . .

+3

, , , , Managed Extensibility Framework: http://mef.codeplex.com/. , ?

+4

, , , . , , , , .

abstract, , virtual optionnaly .

, .

, , , . , , , .

+3

All Articles