How to register unitycontainer inside unitycontainer

Apr 11, 2009 at 7:09 PM

In prism unity container configured in bootstrapper, can reslove IUnityContainer interface, and there is following comments in code:

// We register the container with an ExternallyControlledLifetimeManager to avoid
// recursive calls if Container.Dispose() is called.

But I failed to find where u have registered it. Please tell me where I can find how u've done it.

Best regards,
Alexey Zakharov.
Apr 12, 2009 at 9:41 AM
Hi Alexey

The Unity Container registeres himself in the container.
So there is no need to register the the container instance within the container.

To get the container can easly be resolved using Container.Resolve<IUnityContainer> or by simply specifing the IUnityContainer interface as a dependency on any component.
More Details to Unity can be found at:

Hope this helps