UnityObjectBuilder(IUnityContainer container, DefaultInstances defaultInstances) { this.container = container; this.defaultInstances = defaultInstances; var propertyInjectionExtension = this.container.Configure <PropertyInjectionContainerExtension>(); if (propertyInjectionExtension == null) { this.container.AddExtension(new PropertyInjectionContainerExtension(this)); } }
UnityObjectBuilder(IUnityContainer container, Func <Type, bool> ancestorsHaveDefaultInstanceOf, bool owned) { this.owned = owned; this.container = container; defaultInstances = new DefaultInstances(); this.ancestorsHaveDefaultInstanceOf = ancestorsHaveDefaultInstanceOf; var propertyInjectionExtension = this.container.Configure <PropertyInjectionContainerExtension>(); if (propertyInjectionExtension == null) { this.container.AddExtension(new PropertyInjectionContainerExtension(this)); } }