Reflectively wireup events on object creation

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello...

What I'm trying to do is wire up the OrderProcessed event of a Order object
reflectively so that orderprocessed is just fired off. I am trying to have
the parent app automatically wire up that event when objects are created,
without the order object having any code polution.

What I had in mind was something that ran, and watched an app domain and
when it saw objects of type order just tie up the events... however I KNOW I
am over thinking this.

Requirements...

Order has no hardcoded event registration... simply fires off
ordercreated... and parent app that creates orders doesnt either.

I'd effectively like to have a seperate app wire the events so that the
business objects dont have to have any knowlege of whats running.


Weston


.