public override IMutablePicoContainer MakeChildContainer() { ImplementationHidingCachingPicoContainer pc = new ImplementationHidingCachingPicoContainer(caf, this, lifecycleManager); DelegateContainer.AddChildContainer(pc); return pc; }
public override IMutablePicoContainer MakeChildContainer() { ImplementationHidingCachingPicoContainer pc = new ImplementationHidingCachingPicoContainer(caf, this, lifecycleManager); DelegateContainer.AddChildContainer(pc); return(pc); }
public void UsageOfADifferentComponentAdapterFactory() { // Jira bug 212 - logical opposite IMutablePicoContainer parent = new DefaultPicoContainer(); ImplementationHidingCachingPicoContainer pico = new ImplementationHidingCachingPicoContainer(new ConstructorInjectionComponentAdapterFactory(), parent); pico.RegisterComponentImplementation(typeof (IList), typeof (ArrayList)); IList list1 = (IList) pico.GetComponentInstanceOfType(typeof (IList)); IList list2 = (IList) pico.GetComponentInstanceOfType(typeof (IList)); Assert.IsNotNull(list1); Assert.IsNotNull(list2); Assert.IsTrue(list1 == list2); }
public void UsageOfADifferentComponentAdapterFactory() { // Jira bug 212 - logical opposite IMutablePicoContainer parent = new DefaultPicoContainer(); ImplementationHidingCachingPicoContainer pico = new ImplementationHidingCachingPicoContainer(new ConstructorInjectionComponentAdapterFactory(), parent); pico.RegisterComponentImplementation(typeof(IList), typeof(ArrayList)); IList list1 = (IList)pico.GetComponentInstanceOfType(typeof(IList)); IList list2 = (IList)pico.GetComponentInstanceOfType(typeof(IList)); Assert.IsNotNull(list1); Assert.IsNotNull(list2); Assert.IsTrue(list1 == list2); }