Add registering on an interface next to a delegate

May 25, 2013 at 2:57 PM
Edited May 25, 2013 at 3:00 PM
To register an event writer on the manager a delegate is used.
logManager.RegisterWriter(BlackBoxUtilities.GetAllEventTypes(), consoleWriter.Write);
Where consoleWriter.Write is a method specified like the following delegate:
delegate void EventWrite(EventMessage message);
Maybe it's more clear to use a interface:
logManager.RegisterWriter(BlackBoxUtilities.GetAllEventTypes(), consoleWriter);
Where ConsoleWriter implements interface IEventWriter. Which has the method:
void Write(EventMessage message);