public void Context_Inherits_Parent_Injector()
        {
            AddRootToStage();

            parentContext
            .Install(typeof(SupportParentFinderExtension))
            .Install(typeof(TestSupportViewStateWatcherExtension))
            .Install(typeof(ModularityExtension))
            .Configure(new ContextView(parentView));

            childContext
            .Install(typeof(TestSupportViewStateWatcherExtension))
            .Install(typeof(ModularityExtension))
            .Install(typeof(SupportParentFinderExtension))
            .Configure(new ContextView(childView));

            ContainerRegistry cr = new ContainerRegistry();

            cr.SetParentFinder(new SupportParentFinder());

            parentContext.injector.Map(typeof(ContainerRegistry)).ToValue(cr);
            childContext.injector.Map(typeof(ContainerRegistry)).ToValue(cr);

            cr.AddContainer(parentView);
            cr.AddContainer(childView);

            root.AddChild(parentView);
            parentView.AddChild(childView);

            Assert.That(childContext.injector.parent, Is.EqualTo(parentContext.injector));
        }
 private void BeforeInitializing()
 {
     if (_injector.HasDirectMapping(typeof(ContainerRegistry)))
     {
         ContainerRegistry registry = _injector.GetInstance(typeof(ContainerRegistry)) as ContainerRegistry;
         registry.SetParentFinder(_parentFinder);
         _injector.Unmap(typeof(IParentFinder));
         _injector.Map(typeof(IParentFinder)).ToValue(registry);
     }
 }
        private void BeforeInitializing()
        {
            ContainerRegistry registry = _injector.GetInstance(typeof(ContainerRegistry)) as ContainerRegistry;

            registry.SetParentFinder(_parentFinder);
        }