How NOT to search type up to parent container?

Apr 12, 2012 at 4:50 PM

Hello, we are in the process of rewriting SCSF (based on object builder 1) application to Unity. We are trying to rewrite WorkItem and associated collections to use Unity container.

To achieve compatibility with existing application, we need to change search mode while resolving specific types. For this specific types, we want NOT to search to parent container, if registered type is not found. Is there any chance how to make this?

Thanks for any guidance.

Apr 14, 2012 at 9:16 AM

I didn't see a way of doing this.  It looks like the registrations are placed in the child container when it is created.  There may be some magic that could be done with a UnityContainerExtension but I don't see it.  As a last resort, modifying the source code could be considered.

I wonder if anyone else has any thoughts?

Randy Levy
Enterprise Library support engineer