protected override void OnFinalizeBinding(DiContainer container) { var provider = _factoryBindInfo.ProviderFunc(container); RegisterProviderForAllContracts( container, new CachedProvider( new TransientProvider( _factoryBindInfo.FactoryType, container, InjectUtil.CreateArgListExplicit( provider, new InjectContext(container, typeof(TContract))), null, BindInfo.ContextInfo))); }
protected override void OnFinalizeBinding(DiContainer container) { var factory = new FactoryProviderWrapper <TContract>( _factoryBindInfo.ProviderFunc(container), new InjectContext(container, typeof(TContract))); var settings = new MemoryPoolSettings() { InitialSize = _poolBindInfo.InitialSize, ExpandMethod = _poolBindInfo.ExpandMethod, }; RegisterProviderForAllContracts( container, new CachedProvider( new TransientProvider( _factoryBindInfo.FactoryType, container, InjectUtil.CreateArgListExplicit(factory, settings), null, BindInfo.ContextInfo))); }