protected override IWindsorContainer CreateContainer(FrameworkContainer<IWindsorContainer> parentContainer) { IWindsorContainer childContainer = new WindsorContainer(); parentContainer.ContainerObject.AddChildContainer(childContainer); return childContainer; }
public void ShouldNotResolveNonDefaultType() { var container = new FrameworkContainer(); string typeName = typeof(ClassForResolvingViaDefaultTypeName).AssemblyQualifiedName; var r1 = container.Resolve <IDontHaveDefaultTypeName>(); }
public void ShouldFallbackToType() { var container = new FrameworkContainer(); var r1 = container.Resolve <IHaveDefaultTypeAndWrongName>(); Assert.IsInstanceOfType(r1, typeof(Class3)); }
public void ShouldFallbackToDefaultType() { var container = new FrameworkContainer(); var r1 = container.Resolve <IHaveDefaultTypeName>(); Assert.IsInstanceOfType(r1, typeof(ClassForResolvingViaDefaultTypeName)); }
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()); }
public void ShouldNotResolveNonDefaultType() { var container = new FrameworkContainer(); var r1 = container.Resolve <IDontHaveDefaultType>(); }