Update on interception mechanism

Sep 5, 2008 at 3:10 PM
Edited Sep 5, 2008 at 3:12 PM

Can you throw us a bone on the native unity interception mechanism?

I've been using PIAB to get by, however it is frustrating dealing with dependencies within ICallHandler. For example, I have a simple logging interceptor implemented with PIAB and I would like to get the ILogger service from the child container that is builing my object. Since PIAB is disconnected from the unity build pipeline, I am doing some gymnastics using a service locator to get a handle on a suitable ILogger. I am hoping the unity mechanism will let me do something like:

class LoggingCallHandler : ICallHandler
    public LoggingCallHandler(ILogger logger)
Sep 5, 2008 at 9:09 PM
We started work on the interception stuff this week. It'll take at least a few more weeks to get everything in, but you should be able to see where we're going with the drop at the end of next week.

And yes, the intention is that you will be able to do exactly what you're showing above - call handlers will be resolved through the container and have dependencies injected.

Sep 18, 2008 at 10:14 PM
I'm vaguely familiar with Policy Injection Block.  Can you comment on how the two will be related?  Will PIB go away in favour of Unity interception?   Or is there stuff that PIB does that Unity's implementation won't?

Sep 21, 2008 at 2:38 AM

The intention is that the core interception mechanisms will move from PIAB to Unity. PIAB will build on top of the container (existing call handlers and APIs will be preserved). PIAB will become the collection of call handlers that do entlib-related stuff.