TinyPlug

posted by Dave

Small Plug-in Manager, written in C#. Allows a project to define supported interfaces, and at runtime add plug-ins which implements these interfaces. 

The project is not in competition with MEF, its just a lightweight manager, which does not require your plugin's to have knowledge of it.

UPDATE - TinyPlug is being used in my framework boneStructure! and I'm please to say I like the results.

The solution contains 2 projects 

dbones.Plugin – This has the TinyPlug, the plug-in manager (Contains all the classes required) 

dbones.Plugin.Test – All the unit tests for this project (not many, but it covers 80% of this tiny codebase) 

Requires .Net 3.5 

Features 

  1. Manages multiple interface
  2. For each supported interface, it can have many associated plug-ins 
  3. A supported interface can have a defaulted associated plug-in 
  4. Creates an instance of a plug-in on request (sorry it does not cache the instance for the singleton pattern, but you can implement this and send the code to me) 
  5. A plug-in can be registered for a single interface 
  6. A plug-in can be registered for any supported interfaces it implements