public void addChild_sets_child_parentInjector()
        {
            Context child = new Context();

            context.AddChild(child);
            Assert.That(child.injector.parent, Is.EqualTo(context.injector));
        }
        protected virtual void OnContextAdd(IEvent evt)
        {
            ModularContextEvent castEvent = evt as ModularContextEvent;
            object contextView            = castEvent.ContextView;

            // We might catch out own existence event, so ignore that
            if (contextView == _contextView)
            {
                return;
            }

            if (ValidateContextView(contextView))
            {
                _logger.Debug("Context existence event caught. Configuring child context {0}", castEvent.Context);
                _context.AddChild(castEvent.Context);
            }
        }