lukevenediger/statsd.net — pull request #20 by joshclark (2013-12-30 18:29:04+00:00)
Title: Add support for plugable backends

Adding support for defining backends in an external DLL (rather than in the main code shipped with statsd.net). This code looks for implementations of IBackend in any DLLs located in the same folder as the exe. We could look for plugins in a "plugins" folder, but that seemed more confusing. It seems simpler to just look in the same folder.

In order to extract all the backend functionality I had to change how the configuration is loaded. The backend implementation is now responsible for loading its config settings from the XElement passed in (this is the XML entry from the config file).

I added a sample File Backend that appends to a text file as a proof of concept. Just add the DLL to the main bin directory to make it available (a list of available backends is written to the log file). To enable a backend, just add the configuration to the config file.

(This is my first gitthub pull request so I apologize in advance if a screw something up :) )