protected override IWindsorContainer CreateContainer(FrameworkContainer<IWindsorContainer> parentContainer)
        {
            IWindsorContainer childContainer = new WindsorContainer();
            parentContainer.ContainerObject.AddChildContainer(childContainer);

            return childContainer;
        }
예제 #2
0
        public void ShouldNotResolveNonDefaultType()
        {
            var container = new FrameworkContainer();

            string typeName = typeof(ClassForResolvingViaDefaultTypeName).AssemblyQualifiedName;

            var r1 = container.Resolve <IDontHaveDefaultTypeName>();
        }
예제 #3
0
        public void ShouldFallbackToType()
        {
            var container = new FrameworkContainer();

            var r1 = container.Resolve <IHaveDefaultTypeAndWrongName>();

            Assert.IsInstanceOfType(r1, typeof(Class3));
        }
예제 #4
0
        public void ShouldFallbackToDefaultType()
        {
            var container = new FrameworkContainer();

            var r1 = container.Resolve <IHaveDefaultTypeName>();

            Assert.IsInstanceOfType(r1, typeof(ClassForResolvingViaDefaultTypeName));
        }
예제 #5
0
        public void ShouldResolveDefaultTypeByName()
        {
            var container = new FrameworkContainer();

            var r1 = container.Resolve <IHaveDefaultTypeAndName>();

            Assert.IsInstanceOfType(r1, typeof(Class2));
        }
        protected override IWindsorContainer CreateContainer(FrameworkContainer <IWindsorContainer> parentContainer)
        {
            IWindsorContainer childContainer = new WindsorContainer();

            parentContainer.ContainerObject.AddChildContainer(childContainer);

            return(childContainer);
        }
        public void ShouldLoadDefaultTypeNameObjects()
        {
            var container = new FrameworkContainer();

            foreach (var pair in knownTypeNameMappings)
            {
                var resolvedObject = container.Resolve(pair.Key);
                Assert.IsNotNull(resolvedObject);

                AssertX.IsInstanceOfType(resolvedObject, pair.Value);
            }
        }
 protected override IUnityContainer CreateContainer(FrameworkContainer<IUnityContainer> parentContainer)
 {
     return parentContainer.ContainerObject.CreateChildContainer();
 }
 /// <summary>
 ///     <see cref="IFrameworkContainer"/> 가 참조하는 IoC 컨테이너 객체를 생성합니다.
 /// </summary>
 /// <param name="parentContainer">	부모 <see cref="IFrameworkContainer"/> 객체입니다. </param>
 /// <returns>
 ///     참조된 IoC 컨테이너로 <see cref="IFrameworkContainer"/> 를 반환합니다.
 /// </returns>
 protected override IWindsorContainer CreateContainer(FrameworkContainer <IWindsorContainer> parentContainer)
 {
     return(new WindsorContainer());
 }
예제 #10
0
        public void ShouldNotResolveNonDefaultType()
        {
            var container = new FrameworkContainer();

            var r1 = container.Resolve <IDontHaveDefaultType>();
        }