I need some duct tape... I have a scenario where two objects, backed by two separate databases (on separate servers), have need to relate to one another. I have the object graph in place, but due to some other application "features", I can't rely on the O/RM to map the relationship; I have to manually fill that particular relationship when I get one or the other class instance.
I have a couple of extension methods that assist with this, but now that I'm staring down the long road of finding all the places in my app where I need to now call that extension method, I'm trying to find a way to make it happen at a global level when one of the objects is instantiated. Can't do it in the object constructors for reasons created by the previously mentioned "features".
Is there a way for me to use the IoC container to catch/trap when a specific object is instantiated (not necessarily a DI type scenario), and make modifications on that object prior to it's use? Like some kind of "OnActivated" event handler?
Sort of grasping at straws, I know... For what it's worth, this app is MVC 2, using NHibernate, Autofac, and a lot of spit and gristle.