ICallHandler BuildUp by Unity

Topics: Policy Injection Application Block
Jul 20, 2008 at 3:47 PM
I was working on a custom ICallHandler (PIAB) and wanted to have some constructor dependencies supplied by Unity. Is this possible with with EntLib4 or do I need to wait for AOP to be supported natively by Unity?
Jul 21, 2008 at 1:32 PM
Hi,

PIAB doesn't use Unity to create handlers in v4, so it's currently not possible to get them injected objects supplied by Unity unless you somehow make the container available to your custom handler's assembler class through some thread-scoped data structure.

I'm not sure how it would work with a natively-supported policy injection support from Unity. The creation of handlers would be a meta-creation, in the sense that they would be created during the creation of other (the "real") objects. I don't know if the scopes of handlers and real customer objects would intersect, but it looks like it would make sense for them to do so.

Fernando


mvalenty wrote:
I was working on a custom ICallHandler (PIAB) and wanted to have some constructor dependencies supplied by Unity. Is this possible with with EntLib4 or do I need to wait for AOP to be supported natively by Unity?