Interception Capability

Feb 14, 2008 at 5:15 PM
Are you planning the addition of an interception mechanism at runtime. Or is there a place where we could plug a interception mechanism with DynamicProxy or Linfu ? Are there any plans to add AOPish capabilities in Unity ?

Thanks :)

Feb 14, 2008 at 7:40 PM
We're planning on doing integration with the entlib Policy Injection Application Block. This will be done as a standard Unity extension, so if you would prefer something else you can easily hook that in as well.

To write an extension, you'll need to understand ObjectBuilder. For more information on that, look at my blog series Deconstructing ObjectBuilder.

We're working on the extension documentation now. For examples of extensions, look at the code for the EventBroker quickstart and the Unity.StaticFactory project.

-Chris
Feb 22, 2008 at 11:05 AM
Thanks for the answer, i have another one :) why don't use leverage what has been done on OB2, I Know they have created an Interception Project on top of OB2. It would bring value to the container without having to add any Application Block.
Feb 22, 2008 at 1:35 PM
Edited Feb 22, 2008 at 1:35 PM
BTW, Martjin has already posted a sample on how to use PIAB and Unity:
http://www.codeplex.com/unity/Thread/View.aspx?ThreadId=22453

And I also posted a WI on this a while ago where I explained that Virtual Method and Interface Interception using IL emit are would be great:
http://www.codeplex.com/unity/WorkItem/View.aspx?WorkItemId=1507