Small Plug-in Manager, written in C#. Allows a project to define supported interfaces, and at runtime add plug-ins which implements these interfaces.
Please feel free to use the code, but bear in mind it was written as a small programming exercise to see what a plug-in manager may look like.
The solution contains 2 projectsdbones.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
Projects which use TinyPlug
- Manages multiple interfaces
- For each supported interface, it can have many associated plug-ins
- A supported interface can have a defaulted associated plug-in
- 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)
- A plug-in can be registered for a single interface
- A plug-in can be registered for any supported interfaces it implements
For now look at the Unit Tests to get you started