Automatically process event handlers with StructureMap?

Say I have an event defined in an interface.

Then I have many classes that implement this interface.

The creation of these classes is controlled by StructureMap.

Now say that I have one delegate that I want to use as an event handler for ALL of these newly created instances.

Is there a way to tell StructureMap to add an event handler to the objects it creates?

(NOTE: My current solution is to create the Notifier class and pass it through the constructor that does the job, but I'm curious if I can remove the mediator.)

+5
source share
1 answer

All Articles