PrismContainerProvider

May 5, 2008 at 2:05 PM
What is the driving force behind the PrismContainerProvider? It looks like it was introduced to support the RegionManagerService, but I would argue that RegionManagerService could accept an IPrismContainer in its ctor.

Looking through the code, it looks like PrismContainerProvider holds the only non-circular reference to the IPrismContainer (and its underlying IUnityContainer/IWhateverContainer), since Bootstrapper classes are dismissed after they perform their duties. Will we continue to rely on the PrismContainerProvider to keep the container alive or will this responsibility lie elsewhere?
May 8, 2008 at 8:28 AM
@braagh

The PrismContainerProvider is needed by the region static properties. Attached properties in WPF are static, so we can't inject anything in to them. Using the PrismProviider allows the attached property to access the container. The cases where we woud use it are those where we cannot perform injection.

Glenn